In this article
An Auto increment loop is a loop that will continue asking its questions until specifically told to stop. These loops require a script node with a TerminateLoop() function call to end the loop. This can for example be placed inside a condition following a question on whether there are more items to fill in. Without this script node, the loop will continuously create new loop iterations, and the respondent will never be able to finish the loop.
You specify this loop type in the loops node's Properties panel by selecting Auto increment as the Answer type - .
Figure 1 - Specifying an Auto increment loop
An auto increment loop iteration requires some interactive content for the respondent, for example a question, info node etc. If the loop contains nothing interactive then the interview will be terminated with an error status and an error notification will be sent via email.
Note: For Auto increment, if the Random Data Generator is used, after 50 iterations the RDG will stop any further increments of this loop even if the TerminateLoop() call has not been initiated. If it is a nested loop, it will be terminated after 50 iterations per loop iteration.
Note: TerminateLoop() can be called multiple times to exit loop levels in a nested loop. Calls to TerminateLoop() in the middle of a loop will have no effect.
Note that it is not possible to flatten data collected in an auto increment loop. This applies when using Templates, the Data Central Flatten operation, and when exporting with the 'single file' option.