I was wondering if a select multiple answer can be used to populate a repeat section , i know i can constrain the repeats to the number of selected answers but i was also wondering if i could pre-populate the answers in the repeats as well. i thought that a combination of the functions selected-at and count may work but i keep getting dependency errors
so for example.
Question one
Repeat 1
Repeat 2
Repeat 3
Solved! Go to Solution.
I figured it out i was using the combination of the functions selected-at and count but in the wrong way. I had it inside my repeat which was causing the issue i believe, i moved it outside and set up a default answer in side my repeat to use as the count field and then i just use a minus one to account for the indexing of the select multiple question. Works a treat and the repeats are also constrained to the number of selections in the select multiple question so as i add a repeat the answer is populated as required.
selected-at(${Hazards_present},count(${default_1})-1)
I figured it out i was using the combination of the functions selected-at and count but in the wrong way. I had it inside my repeat which was causing the issue i believe, i moved it outside and set up a default answer in side my repeat to use as the count field and then i just use a minus one to account for the indexing of the select multiple question. Works a treat and the repeats are also constrained to the number of selections in the select multiple question so as i add a repeat the answer is populated as required.
selected-at(${Hazards_present},count(${default_1})-1)
Hi Paul,
Would you mind sharing your xls form as I would like to try this in a form im designing?
Josh