Welcome to the LimeSurvey Community Forum

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

Random Number Generation

  • airraidsiren1974
  • airraidsiren1974's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 7 months ago #157421 by airraidsiren1974
Random Number Generation was created by airraidsiren1974
Hey Guys...

I have a survey with 7 groups. The first 6 groups have 6 cards with a name and a humor style and the remaining group has 4 cards with descriptions of friendship. I need to ask one question per group without repeating a name, humor style or friendship condition. This needs to be fully randomized, but they cannot repeat.

I found the workaround which shows how to create a random number, but I can't figure out how to make that number not repeat, while, at the same time, store it in separate question_ids.

I looked up the javascript code to generate the random numbers from an array, but how do I get them to be stored in limesurvey?
The topic has been locked.
  • airraidsiren1974
  • airraidsiren1974's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 7 months ago #157422 by airraidsiren1974
Replied by airraidsiren1974 on topic Random Number Generation
Here's the code I was looking at adapting for my survey:

stackoverflow.com/questions/7045615/java...ue-number-every-time
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 7 months ago #157431 by tpartner
Replied by tpartner on topic Random Number Generation
You can load the array elements into sub-questions of a hidden multi-short-text question. Have a look at this post for inspiration - www.limesurvey.org/forum/can-i-do-this-w...oice-question#143140

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