Welcome to the LimeSurvey Community Forum

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

randomization does not work

  • Jannik_Hoehne
  • Jannik_Hoehne's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 6 days ago #265786 by Jannik_Hoehne
randomization does not work was created by Jannik_Hoehne
Please help us help you and fill where relevant:
LimeSurvey version:  6.5.16
Own server or LimeSurvey Cloud:
Survey theme/template:

==================
Dear Lime Survey Forum, 

I am having a problem with randomizing following questions. 
I am having an initial question (in my attached survey G02Q05 of treatment Group 2), this question can be anserwerd with Yes (Option 1) or No (Option 2). Depending on the answer I there are different questions following: If Yes, next there will be a 50% chance of 2 questions following and If the answer is no the same. 
I included a equation question( RandQ ) with the funktion rand(1,2) on the condition that G02Q05 == 1, followed by two questions conditioned to  RandQ  == 1 or  RandQ  == 2.
I did the same for the condition on the condition that G02Q05 == 2.
Therefore I am having one initial question followed by 6 questions (two conditional randomization equations and 4 conditional questions), but they are not shown when I preview the survey. They do not apear when testing the survey. 
Can you please help me to find the error, I attached the survey, relevant treatment group is Treatmen Group 2 
 

File Attachment:

File Name: limesurvey...08-3.lss
File Size:148 KB

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 week 5 days ago #265798 by Joffm
Replied by Joffm on topic randomization does not work
Manno, diese Doppelposts immer.

Well, it's not surprising.
You coded the yes/No questio "AO01", "AO02", but in the condion you wrote "1" resp. "2".
So the condition is always FALSE.
 

File Attachment:

File Name: limesurvey...81_J.lss
File Size:145 KB


Joffm

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • Jannik_Hoehne
  • Jannik_Hoehne's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 5 days ago #265799 by Jannik_Hoehne
Replied by Jannik_Hoehne on topic randomization does not work
Dank dir, das war super hilfreich! 

Allerdings verstehe ich LimeSurvey einfach nicht, für Treatment gruppe 4 habe ich deine Formel übernommen: (und die Fragen Codes umgenannt etc.)  RandQTG4: {if(is_empty(self),rand(1,2),self)}  in diesem Fall sagt er aber, dass er "RandQTG4" bzw. "self" undifined ist.. 
auch in den Fragen danach kann die condition RandQTG4==1 nicht erfüllt werden, da "RandQTG4" unbekannt ist. 

ich habe die Survey wieder mit angehangen.

Vielen Dank für deine Hilfe! 

P.S.: ich wollte die Frage nicht doppelt posten, ich habe nicht gewusst, dass sie erst vom Admin geprüft wird bevor sie gepostet werden und dachte ich habe sie nicht hochgeladen. 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 week 5 days ago #265804 by Joffm
Replied by Joffm on topic randomization does not work
Please, English in this part of the forum.
Though I complained a bit in German.

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • Jannik_Hoehne
  • Jannik_Hoehne's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 5 days ago #265806 by Jannik_Hoehne
Replied by Jannik_Hoehne on topic randomization does not work
Thanks to you, that was super helpful! 

However, I just don't understand LimeSurvey, for treatment group 4 I have adopted your formula: (and renamed the question codes etc.) RandQTG4: {if(is_empty(self),rand(1,2),self)} in this case, however, it says that it is "RandQTG4" or "self" undifined.... 
the condition RandQTG4==1 cannot be fulfilled in the subsequent questions either, as "RandQTG4" is unknown. 

I have attached the survey again.

Many thanks for your help! 



 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 week 5 days ago #265807 by Joffm
Replied by Joffm on topic randomization does not work

it says that it is "RandQTG4" or "self" undifined.... 

I do not see that there is anything "not defined".
Sometimes - when you change something that affects another question, which was not touched - the editor tells you this..

Did you check the logic file?
Here I intentionally changed the code to "RandQTG5" what is really not defined.
 
How does it look in your survey?

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose