Actions

Translations

Translations:ExpressionScript sample surveys/142/en

From LimeSurvey Manual

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This is Group0, which uses the Equation question type to select random values from 1 to 6 for each group (except the last group, which has only 4 questions). Note that the "if()" function first checks whether ask1 has already been set, and if so, uses that value. If the value hasn't been set, then it uses a random value to set the value of ask1.