Page 1 of 1

SetValueset

Posted: December 10th, 2021, 2:40 am
by Leonard
Hello team
I have an issue here; Have used setvalueset on District valuset so that it shows only specific district per each province. The code is working fine but on Android it is only displaying district for the first province. How can i solve this problem now that people are already collecting data.

here are sample logic:
PROC DISTRICT
preproc

if PROVINCE = 2 then
setvalueset(DISTRICT, DISTRICT_VS2)
elseif
PROVINCE = 3 then
setvalueset(DISTRICT, DISTRICT_VS3)

Re: SetValueset

Posted: December 11th, 2021, 11:27 pm
by Arjun Brti
Used to Onfocus instated of Preproc.

Re: SetValueset

Posted: December 12th, 2021, 10:46 pm
by sherrell
Hi Leonard,

If PROVINCE is keyed in prior to the DISTRICT variable, then your logic should work. What happens when you reach the district variable, is the wrong valueset being used, or is no valueset being used?

If you could post it here, we can take a look at it. If you'd rather not post it to the forum, you can send it to us at cspro@lists.census.gov

Please be sure to zip up the application and provide a sample dataset that has all data values up to the point of the error.

Thanks,
Sherrell

Re: SetValueset

Posted: December 14th, 2021, 9:07 am
by Leonard
thank you, let me zip and send the folder.