Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Randomize & Automatically Number Questions within specific Groups

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 11 months ago #183347 by tpartner

...as you know, the question type messes that up.

Huh? How does a question type mess up group randomization?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • rpfohl
  • rpfohl's Avatar Topic Author
  • Visitor
  • Visitor
4 years 11 months ago - 4 years 11 months ago #183409 by rpfohl
It doesn't anymore so it appears everything is working except one issue I can't seem to resolve. On your survey below if I add a new Group and a new Question for that group it is added to the numbering. How did you keep Group 0 from being counted in the numbering? In your LSS file G1, G2, G3 and G4 are being numbered and showing up randomly as designed. I can easily add G5 and more with no problem but when I want to add something between Group 0 and G1-G4 it changes the numbering. See the modified version of your LSS attached here. I added Pre and Post questions that shouldn't be in the numbering but for some reason the Pre question is being considered as #1 because when G1-G6 should up randomly on the next page they start as #2 no matter what I do. What do you think?

File Attachment:

File Name: limesurvey...4821.lss
File Size:29 KB
Last edit: 4 years 11 months ago by rpfohl.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 11 months ago - 4 years 11 months ago #183423 by tpartner
I think you missed the concept of my expression below which is designed to start numbering after 10 questions:

Code:
{Qcode.qseq-9}

This returns the current questions position index number minus 9. So, for the 11th question, which has an index of 10 (because the indexing starts at 0), this will return 1.

In your test survey, you have 4 questions before the numbering starts (3 in Group 0 and one in Pre). The expression in the "numbered" questions should be:

Code:
{Qcode.qseq-3}

Sample survey attached:

File Attachment:

File Name: limesurvey...4821.lss
File Size:30 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 4 years 11 months ago by tpartner.
The following user(s) said Thank You: holch, rpfohl
The topic has been locked.
  • rpfohl
  • rpfohl's Avatar Topic Author
  • Visitor
  • Visitor
4 years 11 months ago #183427 by rpfohl
Thanks Tony, I did miss that step in the process. Works perfectly now. I appreciate your help.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose