Interpolating a loop variable into pipetext | XM Community
Skip to main content
I'm trying to interpolate the loop variable t into the pipetext of a rank order question so that I can receive the options and eventually the ranks of all the options inside. So far I tried interpolating with `arrayOfProfessors.push('${q://QID3/ChoiceDescription/'+t+'}');` and `arrayOfProfessors.push('${q://QID3/ChoiceDescription/`$[t]`}');` , but neither have resolved to the correct output. My full array and loop below:

` var t;

var arrayOfProfessors = [];

for (t = 0; t < 38; t++){

arrayOfProfessors.push('${q://QID3/ChoiceDescription/'+t+'}');

}`



Any help would be greatly appreciated.
Be the first to reply!

Leave a Reply