Welcome to the LimeSurvey Community Forum

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

Conditionally turn question randomization "on and off"

  • NielsFro
  • NielsFro's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 4 months ago #207969 by NielsFro
Hi all,

I have a group-by-group survey with 10 questions per group.
The questions of either group have the same Randomization group (e.g. RandGroup1, RandGroup2, ...) to randomize the order of questions presented to the participants. All working fine.

However, we will have cases in which the participants shall be presented a non-randomized survey.

My general idea was:
* add an attribute ("rand") to get the information randomization "on" or "off"
* put curly braces around the randomization group name and write something like {if(rand == "on", RandGroup1, "")}

however, it quickly became clear that the Randomization Group field does not work with curly braces and functions. or was I missing something?

I'm hoping for ideas on this issue :)
Best
Niels

LS Version 3.22.4+200212
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago #207973 by tpartner
No, you cannot use Expression Manager in the randomization group name. My only suggestion would be to copy the survey.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • NielsFro
  • NielsFro's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 4 months ago #207976 by NielsFro
Thanks for the quick answer, @tpartner - I was afraid that this is the only way... but at least now I know for sure :)

... unless anyone else has a genius idea, of course ;)
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago #208048 by DenisChenu
Even with 4 and new plugins event to update order of questions (for example) i didn't have an idea on how to do this ....

Order of questions are done before all expression happen , here you want to redo it after ... really complex system.

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
3 years 4 months ago #208138 by tpartner

DenisChenu wrote: i didn't have an idea on how to do this

The genius has spoken. :)

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • NielsFro
  • NielsFro's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 4 months ago #208141 by NielsFro
Thanks for looking into this!

I have one last idea that could work within the same survey. I'll try to illustrate it with a short example.

Group 1: group relevance "rand == yes"
All questions in same randomization group
question1.1: blabla
question 1.2 blublu
question 1.3 bloblo

Group 2: group relevance "rand == no", questions without randomization
question 2.1: blabla
question 2.2 blublu
question 2.3 bloblo

Group 3: always hidden
equation1: if 1.1 != empty, take 1.1, else take 2.1
equation 2:...
equation 3:...

It basically uses the same survey with the double length, instead of dealing with two surveys, so it's not really elegant :D
Could it work? I currently don't have a computer to try it, so I'd love to get your feedback :)
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago #208151 by DenisChenu

tpartner wrote:

DenisChenu wrote: i didn't have an idea on how to do this

The genius has spoken. :)

? You kidding or you are serious ...

@Niels : yes, it can work :) if your survey are not too big :).

You can put if needed condition on each question.

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
3 years 4 months ago #208156 by tpartner

DenisChenu wrote: ? You kidding or you are serious ...

I'm never serious on weekends. :)

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