Welcome to the LimeSurvey Community Forum

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

random assignment

  • Zimone85
  • Zimone85's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 2 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.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 1 week ago #93473 by tpartner
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
  • DenisChenu's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 1 week ago #93506 by DenisChenu
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

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
  • Zimone85's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 6 days 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
The topic has been locked.
  • Zimone85
  • Zimone85's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 6 days 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
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 6 days ago #93637 by DenisChenu
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

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
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 5 days ago #93659 by tpartner
Replied by tpartner 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?

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.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose