- Posts: 5
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
random assignment
- Zimone85
- Topic Author
- Offline
- New Member
Less
More
11 years 3 weeks ago #93235
by Zimone85
random assignment was created by Zimone85
3) I have one question group composed by two questions called vignette1 and vignette2. I want subjects to be assigned randomly to one or the other. Following the LimeSurvey online user manual I created another question before vignette1 and vignette2. This is a question with the following settings:
Always hide this question: Yes
Type: Equation
Mandatory: No
Question: rand(1,2)
This generates randomly either 1 or 2. Then in the field “relevant equation” of vignette1 and vignette2 I specified ((Random==”1”)) and ((Random==”2”)), respectively. I specified both vignette1 and vignette2 as mandatory questions.
When I test the survey, the randomization works but when I submit the answer it gives me an error. I guess it is because I specify that both vignette1 and vignette2 are mandatory and using the random command I don’t fill one of the two. I also attach a screenshot of the error.
Always hide this question: Yes
Type: Equation
Mandatory: No
Question: rand(1,2)
This generates randomly either 1 or 2. Then in the field “relevant equation” of vignette1 and vignette2 I specified ((Random==”1”)) and ((Random==”2”)), respectively. I specified both vignette1 and vignette2 as mandatory questions.
When I test the survey, the randomization works but when I submit the answer it gives me an error. I guess it is because I specify that both vignette1 and vignette2 are mandatory and using the random command I don’t fill one of the two. I also attach a screenshot of the error.
Attachments:
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
11 years 2 weeks ago #93473
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 random assignment
As far as I can tell, you are doing everything correctly. Maybe you should
file a bug report
.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
11 years 2 weeks ago #93506
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic random assignment
Hello,
And please: what is your LS version ? And did this appear in group test and not in surey test mode.
Denis
And please: what is your LS version ? And did this appear in group test and not in surey test mode.
Denis
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- Zimone85
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
11 years 2 weeks ago #93629
by Zimone85
Replied by Zimone85 on topic random assignment
The LS version is Release 2.00+ Build 130219.
It does not happen in group test. It just happens in survey test mode, upon clicking the button submit (note that this question group is the last of the survey).
Simone
It does not happen in group test. It just happens in survey test mode, upon clicking the button submit (note that this question group is the last of the survey).
Simone
The topic has been locked.
- Zimone85
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
11 years 2 weeks ago #93631
by Zimone85
Replied by Zimone85 on topic random assignment
And by the way, can you suggest a different way to perform random assignment to two questions in a question group?
I hope that creating two different surveys and randomly assign emails/tokens to each is not the unique alternative solution.
Thanks,
Simone
I hope that creating two different surveys and randomly assign emails/tokens to each is not the unique alternative solution.
Thanks,
Simone
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
11 years 2 weeks ago #93637
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic random assignment
Hello,
- Please perform an "Check data integrity"
- Test again
- If broken: fill a bug report with the lss file.
- Try to set debug to 0 if not actually.
Denis
- Please perform an "Check data integrity"
- Test again
- If broken: fill a bug report with the lss file.
- Try to set debug to 0 if not actually.
Denis
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
11 years 2 weeks ago #93659
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 random assignment
If you have a previous group, you can try falling back to the old method of using JavaScript to populate a hidden question in that group with the random number and the base your conditions on the hidden question.And by the way, can you suggest a different way to perform random assignment to two questions in a question group?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.