I am looking for guidance on how to create a repeat group that can retrieve a question choice label from a previous multiple-choice lookup table question. My aim is to utilize this retrieved choice label in subsequent questions within the repeat group.
In other platforms like ODK, I am familiar with using the calculation jr:choice-name(selected-at(${previousquestionname}, (position(..)-1)), '${previousquestionname}') to achieve this functionality. However, I am unsure of the equivalent method in CommCare.
For example:
Question 1: What is your favorite color?
Red
Blue
Green
Yellow
Repeat Group:
Question 2: On a scale of 1 to 5, how much do you associate the color [Choice Label from Question 1] with happiness?
1 (Not at all)
2
3
4
5 (Very much)
Question 2: What emotions do you associate with the color [Choice Label from Question 1]? (Select all that apply)
Joy
Sadness
Anger
Excitement
Calmness
I would greatly appreciate it if you could provide me with instructions or point me in the right direction on how to accomplish this task in CommCare. Any insights, examples, or resources you can share would be immensely helpful.
hello @ayogi I tryed the fallowing syntaxis but I couln´t manage to work:
jr:itext(concat('#form/encuestador -',/ #form/encuestador , '-label'))
This I want to achive:
Q1: Nombre del entrevistador (IDQ: encuestador)
Option1: Raquel
Option2: Virginia
Option 3: Omar
Then I have a "Label question" I have some instruction, but I need to pull the previous option selected:
"Buenos días, mi nombre es . Soy parte del equipo de CEYPROS, quienes estamos realizando una evaluación para el proyecto Juega Conmigo. Debido a que usted ha estado participando en el proyecto, nos gustaría hacerle una entrevista para saber en qué le ha ayudado el proyecto a usted y a su hijo/a."
But whe I see the name it show the ID_option and I need to see the ID Label.
None so far but here is a way to do it without using Checkbox Lookup tables. Uses the normal checkbox. Utilizes the question ids instead of the display text though. So they will come with an underscore if the choices are more than a single word.
Download and upload: Register