Page 1 of 1

How do I create conditional value sets

Posted: April 24th, 2015, 5:31 pm
by cognazor
Hi, I am planning a tablet based survey, and am thinking about switching from ODK to CSPro. A couple of questions:

1) Any opinions on the relative merits of each?

2) I need to be able to display value sets that are conditional on a previous response. So for example, in a retail survey, I want the enumerator to first choose the company that sells the product. Then, when they choose from a list of products, I want the only options to be those sold by that company. I know this can be done in ODK but was wondering if it was possible in CSPRO.

Thanks

Re: How do I create conditional value sets

Posted: April 27th, 2015, 7:53 am
by josh
You can use the command setvalueset() in CSPro logic to change the value set at run-time. More info and examples can be found in the online help.

Re: How do I create conditional value sets

Posted: April 30th, 2015, 5:13 pm
by Guest
Great, thanks Josh!

Re: How do I create conditional value sets

Posted: May 1st, 2015, 12:09 am
by khurshid.arshad
Dear
One option is use external dictionary and for reference please see attached program from example.
a.

Re: How do I create conditional value sets

Posted: May 1st, 2015, 2:46 pm
by Guest
Hi khurshid.arshad, I am brand new to CSPRO. Could you tell me how to use this example? Also, Is it possible to create an external data dictionary outside of CSPRO, like in excel? That would be much faster for me than creating all of the value sets in CSPRO.

Thanks!

Re: How do I create conditional value sets

Posted: May 1st, 2015, 2:58 pm
by josh
If you have your value sets in Excel with the label in one column and the code in the next column then you can copy and paste those two columns from Excel into the value set in CSPro.

Re: How do I create conditional value sets

Posted: May 1st, 2015, 3:35 pm
by Guest
Ok, that works, thanks.

Is there a way by chance to paste in multiple value sets (for the same variable) at the same time?

Re: How do I create conditional value sets

Posted: November 20th, 2015, 4:31 am
by SHYMAN
Appreciate everyone for the post, Though, I wasn't the user who asked for the Conditional Value sets but I am facing the same challenge. I made reference to the attachment which i could not open on the PDA as it displays "Invalid Province, please reenter" anytime i select any of the 15 list under the Privince.

Anyway, I am still not able to do the condional value set, i dont know the logic to use since i am not a program person but i am teachable.
Thank you

SHYMAN

Re: How do I create conditional value sets

Posted: November 20th, 2015, 7:14 am
by josh
There is an example of a conditional (aka dynamic) value set in the CAPI getting started guide on the documentation page (https://www.census.gov/population/inter ... odocs.html). More examples can be found here: http://teleyah.com/cspro/DCJune2015/04-CAPI/04-CAPI.pdf