Welcome, Guest
Username: Password: Remember me

TOPIC: random assignment

random assignment 1 year 7 months ago #93235

  • Zimone85
  • Zimone85's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
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.
Attachments:
The administrator has disabled public write access.

random assignment 1 year 7 months ago #93473

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4281
  • Thank you received: 807
  • Karma: 370
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

random assignment 1 year 7 months ago #93506

  • DenisChenu
  • DenisChenu's Avatar
  • NOW ONLINE
  • Moderator Lime
  • Posts: 6451
  • Thank you received: 844
  • Karma: 249
Hello,

And please: what is your LS version ? And did this appear in group test and not in surey test mode.

Denis
The administrator has disabled public write access.

random assignment 1 year 7 months ago #93629

  • Zimone85
  • Zimone85's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
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 administrator has disabled public write access.

random assignment 1 year 7 months ago #93631

  • Zimone85
  • Zimone85's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
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 administrator has disabled public write access.

random assignment 1 year 7 months ago #93637

  • DenisChenu
  • DenisChenu's Avatar
  • NOW ONLINE
  • Moderator Lime
  • Posts: 6451
  • Thank you received: 844
  • Karma: 249
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
The administrator has disabled public write access.

random assignment 1 year 7 months ago #93659

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4281
  • Thank you received: 807
  • Karma: 370
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.122 seconds
Donation Image