Bienvenue, Invité
Nom d'utilisateur : Mot de passe : Se souvenir de moi

SUJET : Conditions using hidden equation not working properly

Conditions using hidden equation not working properly il y a 9 mois 3 semaines #97525

  • aiseke
  • Portrait de aiseke
  • Hors ligne
  • Fresh Lemon
  • Messages : 2
  • Karma: 0
Hello,

I have Version 1.92+ Build 120815 through the U of Miami server. I am trying to set randomized conditions so that survey participants only see one version of an information packet. To do this I've created a hidden equation type question to randomly generate a number 1 to 3 by writing {rand(1,3)}

I then set conditions for the three subsequent questions such that the first is only shown when a number 1 is generated and so on. The relevance equations for these questions currently look like this: ((genno.NAOK == "1")) etc.

This is almost sort of working: a random number is generated and only one info packet comes up at a time. However, the number's never match the same packet. So though I've set 1 to match packet 1, 2 will come up with 3, 1 with 2, 3 with 2 etc, different everytime. Something's off and I've been searching forums, but I've only found instructions to exactly what I've tried. I need this to match so that when I get my data I know exactly what information was shown the participant as it's intended as an experimental condition.

Any help is greatly appreciated.

best,

Julia
L'administrateur a désactivé l'accès en écriture pour le public.

Conditions using hidden equation not working properly il y a 9 mois 2 semaines #97556

  • tpartner
  • Portrait de tpartner
  • Hors ligne
  • LimeSurvey Team
  • Messages : 3813
  • Remerciements reçus 683
  • Karma: 328
Try this for genno, so it only gets set once:
{if(genno >= 1, genno, rand(1, 3))}
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.
Dernière édition: il y a 9 mois 2 semaines par tpartner.
L'administrateur a désactivé l'accès en écriture pour le public.

Conditions using hidden equation not working properly il y a 9 mois 2 semaines #97567

  • trivender
  • Portrait de trivender
  • Hors ligne
  • Expert Lime
  • Messages : 118
  • Remerciements reçus 3
  • Karma: 4
manual.limesurvey.org/Expression_Manager...e_Question_Per_Group

Import sample survey nd modify according to your requirement.
Trivender Singh
Survey Designer and Programmer
"I always suggest to have a group by group display layout and create a seprate group for each question. This will be extra work but you will get flexiblity to create your question by using more than more lime survey question types."
L'administrateur a désactivé l'accès en écriture pour le public.

Conditions using hidden equation not working properly il y a 9 mois 2 semaines #97573

  • aiseke
  • Portrait de aiseke
  • Hors ligne
  • Fresh Lemon
  • Messages : 2
  • Karma: 0
This appears to have fixed the problem. Many thanks for your help!
L'administrateur a désactivé l'accès en écriture pour le public.
Modérateurs: ITEd
Temps de génération de la page : 0.126 secondes
Donation Image