How to implement a LoopCounter variable in the display logic?

GeorgeFejerGeorgeFejer AmsterdamCommunity Member Qubie ✭

How to implement a LoopCounter variable in the display logic?

Dear community,

I cannot figure out how to implement a loop counter as an embedded variable during the loop.

Basically I am trying to go through a list of 80 randomly selected words in the loop and merge. Depending on whether loopcounter is at 0, 20, 40, 60 counts, I want to set an instruction to alternate between two forms: one where the text displays 'distant' and one where it displays similar. Basically these are condition blocks, that tell the participant to indicate a word that is 'distant' or 'similar' to the stimulus word.

Any suggestions on how I can implement a loop counter in the display logic of the text field?

Answers

  • Paige_SevignyPaige_Sevigny IndianapolisCommunity Member Qubie ✭
    edited June 11

    Rather than storing your loop counter as embedded data (since you can't use this in the middle of a loop and merge block), I would suggest creating a new text entry question at the beginning of your block and setting the default value of the text entry to the pipe text for the current loop number. You can hide this question with css and then use this question for your display logic.

Sign In to Comment