- Posts: 10611
- Thank you received: 3690
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
- Offline
- LimeSurvey Community Team
Less
More
4 years 11 months ago #183347
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Randomize & Automatically Number Questions within specific Groups
Huh? How does a question type mess up group randomization?...as you know, the question type messes that up.
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
- Topic Author
- Visitor
4 years 11 months ago - 4 years 11 months ago #183409
by rpfohl
Replied by rpfohl on topic Randomize & Automatically Number Questions within specific Groups
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?
Last edit: 4 years 11 months ago by rpfohl.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3690
4 years 11 months ago - 4 years 11 months ago #183423
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Randomize & Automatically Number Questions within specific Groups
I think you missed the concept of my expression below which is designed to start numbering after 10 questions:
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:
Sample survey attached:
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:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
Last edit: 4 years 11 months ago by tpartner.
The following user(s) said Thank You: holch, rpfohl
The topic has been locked.
- rpfohl
- Topic Author
- Visitor
4 years 11 months ago #183427
by rpfohl
Replied by rpfohl on topic Randomize & Automatically Number Questions within specific Groups
Thanks Tony, I did miss that step in the process. Works perfectly now. I appreciate your help.
The topic has been locked.