Hi folks,
I am using Wake’s Post as a workaround to displaying 1 of 4 possible pages in a randomised way to participants.
I have created 2 variables in the main survey logic tab under Calculated Values:
randNum
, which is set to random()*4+1
(so random number between 1 and 5)
condition
, which is set to iif({randNum} > 4, "cond1", iif({randNum} > 3, "cond2", iif({randNum} > 2, "cond3", "cond4")))
I have a welcome page that I want everyone to see and then 4 pages with questions on them. I want to display one of those 4 pages to participants depending on their condition (cond1, cond2, cond3, or cond4).
The expressions work, BUT every time the user ticks a box, or dropdown or whatever the interaction, the calculated values seem to re-execute, therefore causing weird behaviour. Am I putting these expressions in the wrong place, or is there a way to set these values once at the start of the survey and not re-execute?
I did read in the SurveyJS docs that expressions re-evaluate when the information used in them changes, but I’m not changing any of them…I don’t think.
Any help is appreciated.
My JSON can be found below in case that helps.
four-way.json (2.0 KB)
Kris