Pavlovia survey issue with group allocation using a random number

It looks like the survey-groups code I was using only worked with old surveys.

I’ve updated it so you can now select the survey version (by adding &version=2024.2.0)

I’ve also updated the default so your survey now works (use an incognito tab to check).

I also notice that the group expression question isn’t needed any more, and nor is the final page for everyone.

Thank you!!

Hi Wake, I have tried the above steps and can’t seem to get mine to work. I have attached json and link to survey. Not sure what I am doing wrong, thanks!

https://run.pavlovia.org/vespr/survey-group/?surveyId=9fdb7e6c-9b7a-4a9c-af64-46132d27ab65&groups=2&version=2024.2.0

survey_9fdb7e6c-9b7a-4a9c-af64-46132d27ab65-3.json (54.6 KB)

The error is TypeError: Cannot read properties of null (reading ‘questionsPerPage’)

I’ve fiddled about with the JSON and ended up deleting

null,null,null,null,{“questionsPerPage”:2,“showOnly”:0,“layout”:[“QID16”,“set1”],“set0”:,“set1”:[“QID13”,“QID17”]}

from

“questionsOrderRandomization”:[null,null,null,null,{“questionsPerPage”:2,“showOnly”:0,“layout”:[“QID16”,“set1”],“set0”:,“set1”:[“QID13”,“QID17”]}],

Try this link

https://run.pavlovia.org/vespr/survey-group/?surveyId=34b19bcf-62c7-4212-b308-ab09c33d326f&groups=2&version=2024.2.0&groups=2&version=2024.2.0

survey_9fdb7e6c-9b7a-4a9c-af64-46132d27ab65-3-fixed.json (54.5 KB)

Please could you PM me the original QSF file?