Building a set of select items from previous answer

30 views
Skip to first unread message

em...@aquaya.org

unread,
Feb 17, 2015, 4:13:03 AM2/17/15
to commcar...@googlegroups.com
Hello CommCare Users,

We have a survey where we need to first do a household roster (name of everyone in household) and then, in later sections, ask who from that roster is answering a particular set of questions.  So basically there'd be a series of text questions earlier, each with name of people in household, then a single-select question later where the set of items to choose shows a list of those names.  

I'm trying to figure out if it's possible to do this, I'm guessing no in app builder, but by modifying XML code.  I'm familiar with lookup tables but if I'm not mistaken, that's for pre-established lists and can't be generated on the fly?  Any thoughts would be greatly appreciated!

Emily

Sheel Shah

unread,
Feb 17, 2015, 12:05:26 PM2/17/15
to commcar...@googlegroups.com
Hey Emily,

Its certainly possible, but you would need to use a repeat group to collect the name of each person in the household.  

Once you've done that you can setup a single select question similar to how you setup a single select question for a lookup table.  However, you'd need to setup the itemset to something like this:

<itemset nodeset="/data/my_repeat_group">
<label ref="name_question_in_repeat"/>
<value ref="id_question_in_repeat"/>
</itemset>

Happy to follow up individually with you if that doesn't make sense.

Regards,
Sheel


--
You received this message because you are subscribed to the Google Groups "commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to commcare-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Sheel Shah
Project Manager | Dimagi
m: +1.781.428.5419 | skype: sheel_shah


Emily Kumpel

unread,
Feb 18, 2015, 6:59:49 AM2/18/15
to commcar...@googlegroups.com
Thanks, Sheel!  That does make sense and I think I have a good idea of how to do it.

Thanks!
Emily 
You received this message because you are subscribed to a topic in the Google Groups "commcare-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/commcare-users/zVK5FJJz_rs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to commcare-user...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages