I am trying to create relevant questions based on the number of answers a user inputs from a repeat section. In the example below, I only want Objectives 2, 3, 4 to appear if there is more than 1 objective entered in the Objectives repeat
Survey:
Form:
Tried this:
I entered 4 objectives:
but only 1 objective appears
Solved! Go to Solution.
You can use count() for this. count(${SomeQuestionInTheRepeat}) > 1 should do it.
You can use count() for this. count(${SomeQuestionInTheRepeat}) > 1 should do it.
@DougBrowning awesome, that work perfectly. Thank you!! One last thing, if I want to bring in the answers from each repeat to part of the label. what's the best way to do that?
Do you mean you want them to line up from the repeat like repeat 1 = label 1?
If so I would take a look at this function note it may not like this in the label - if it does not make a calculate field with this code then use that.
indexed-repeat(question, repeat, index number) | Returns the value from a specific question in a repeat record. For more information, see Repeats. | indexed-repeat(${room_no}, ${floor}, 3) |
@DougBrowning yes, line up from the repeat like repeat 1 = label 1. thanks for the tip! I will look at using this