Hello CSPro Users,
I hope you are all doing ok and happy with the Android news
I have a problem with a scenario: I want to be able to dynamically update value set items: using answers entered by users in a question as value set items for following questions.
My guess is that, I will have to use Logic to alter data dictionary: Is that possible?
It is possible. You have to use the setvalueset function to do this. If you look at the Metro Survey application included with the Android application you can see an example of how this is done:
Thanks.
Sounds like what I am looking for but I am not sure I understand how this thing works.
The stations have their own dictionary (Stations.dcf) and data file (metro-survey-wmataStations.dat) but how do you update the data?
What's the purpose of the Metro Survey.ent.wrk.dcf dictionary?
I don't understand how the createStationValueset(colorCode) works.
The metro survey application is a more complicated program, so here is a more basic one. See attached, and the following code for how to create a dynamic value set based on selections made in a check box:
do ctr = 1while ctr <= length(strip(MEATS_CONSUMED))
// ctr - 1 because the dynamic value set begins at position 0, not 1 vsLabels(ctr - 1) = getlabel(MEATS_CONSUMED BY code MEATS_CONSUMED[ctr:1]);
vsCodes(ctr - 1) = ctr;
enddo;
vsCodes(ctr - 1) = notappl; // end the dynamic value set setvalueset(FAVORITE_MEAT,vsCodes,vsLabels); setcapturetype(FAVORITE_MEAT,1); // display this as a radio button
postproc
errmsg("Your favorite meat is: %s",getlabel(MEATS_CONSUMED BY code MEATS_CONSUMED[FAVORITE_MEAT:1]));
You do not have the required permissions to view the files attached to this post.