incremental looping with piped text ? | XM Community
Solved

incremental looping with piped text ?


Badge +2
Hello - iam new here but eager to learn !

Iam struggling to get to grips with a simple problem - how can i get questions presented for n times where n is a participant defined variable ?

So e.g., Q1 How many times have you done N ?

n=5

let n=1
Q2 please answer the Qs about N
Let n=1+1
does n=5
No then repeat
Yes then end

in Q2 N would increment from 1 to N

please help !

all the best

Carl
icon

Best answer by TomG 11 June 2019, 16:05

View original

4 replies

Userlevel 7
Badge +27
@seniorc,

Put "Q1 How many times have you done N ?" in a block before the loop & merge. Set up the loop & merge to have the maximum N value, then loop based off the question Q1.
Badge +2
Many thanks for your reply but if N was user defined - how would this be set ?
Badge +4
@seniorc - as @TomG mentioned, you will have to set maximum N value in the "Max Loops" option. You can limit/validate the value of N user is putting in Q1.

Ultimately you will have to let the tool know that these much loops are excepted, so that tool creates the data columns as per your max limit.
Badge +2
many thanks both - sorted now

Leave a Reply