How do I create conditional value sets

Discussions about CSEntry
Post Reply
cognazor
Posts: 7
Joined: April 24th, 2015, 5:15 pm

How do I create conditional value sets

Post 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
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: How do I create conditional value sets

Post 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.
Guest

Re: How do I create conditional value sets

Post by Guest »

Great, thanks Josh!
khurshid.arshad
Posts: 572
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Re: How do I create conditional value sets

Post by khurshid.arshad »

Dear
One option is use external dictionary and for reference please see attached program from example.
a.
Attachments
Set Value Set.rar
(9.65 KiB) Downloaded 553 times
Guest

Re: How do I create conditional value sets

Post 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!
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: How do I create conditional value sets

Post 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.
Guest

Re: How do I create conditional value sets

Post 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?
SHYMAN
Posts: 3
Joined: November 20th, 2015, 4:14 am

Re: How do I create conditional value sets

Post 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
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: How do I create conditional value sets

Post 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
Post Reply