How do i list items which are in a categorical question in a loop into another question which is not in a the loop.
For example:
Q1. How many stoves did you use: 3
Q2. Which type of stove is this
Type 1
2.Type 2
Type 3
Type 4
Type 5
Q2 should be iterating based on number in Q1.
All the stoves which have been listed listed in Q2 are the only ones that should appear in Q3. In my case i selected
Type 3 in first looping
Type 2 in second looping and
Type 5 in third looping
Q3. Which stove do you use most?
Type 3
Type 2
Type 5
How do i accomplish this. Attached is what i have tried and it is not bringing the desired output.Haiti V04_2_support.xlsx (15.1 KB)
Hello @yanokwa I am having a problem with index repeat function. I want to list categorical answers which have been selected in a loop in a different question. I have use the following code :indexed-repeat(${HC3}, ${stove}, 1) and indexed-repeat(${HC4}, ${stove}, 1)
indexed-repeat(${HC3}, ${stove}, 2) and indexed-repeat(${HC4}, ${stove}, 2)
indexed-repeat(${HC3}, ${stove}, 3) and indexed-repeat(${HC4}, ${stove}, 3)
indexed-repeat(${HC3}, ${stove}, 4) and indexed-repeat(${HC4}, ${stove}, 1)
indexed-repeat(${HC3}, ${stove}, 5) and indexed-repeat(${HC4}, ${stove}, 5)
indexed-repeat(${HC3}, ${stove}, 6) and indexed-repeat(${HC4}, ${stove}, 6)
indexed-repeat(${HC3}, ${stove}, 7) and indexed-repeat(${HC4}, ${stove}, 7)
Where HC3 and HC4 are my target variable in the loop and ${stove} is the repeat_name. What might be missing? Kindly help
I'm not sure if I understand so to clarify... you want to create a list of items in order to use in select-one question based on items selected in a repeatable group?
@Grzesiek2010 Thanks for your reply. Yeah. Just to amplify. What i want is to list the items selected in repeat groups in HC3 and HC4 in a select-one question.
What do you mean by HC3 and HC4? Could you add a good sample?
If you select Electric stove in HC3 and NAME/BRAND 1 in HC4 in your first repeat group you expect to create an option for select one like Electric NAME/BRAND 1?
What is the problem? Can't you download it? I can't send xls version because it's a tricky case which requires one change in xml file after converting it.
@Grzesiek2010 Thanks for helping. It is still not uploading. Can we abandon the whole code i.e indexed-repeat(${HC3}, ${stove}, 2) and indexed-repeat(${HC4}, ${stove}, 2) and deal with one item i.e indexed-repeat(${HC3}, ${stove}, 2) and try introducing jr:choice code to see if it can work in xls format? Your help will be highly appreciated.