- Posts: 51
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Relevance coding not working?
- PaulMRFGR
- Topic Author
- Offline
- Senior Member
Less
More
5 years 4 months ago #177125
by PaulMRFGR
Relevance coding not working? was created by PaulMRFGR
Hey!
So at the start of the survey, we have an equation question which gives each respondent a random number between 1-6. The question is called randnumber
if(is_empty(randnumber), rand(1, 6), randnumber)
Some questions in the survey only show for some respondents (depending on which random number they got at the start). I've set up the relevance on each question accordingly:
randnumber==1
randnumber==2
randnumber=
randnumber==4
randnumber==5
randnumber==6
However, the relevance doesn't seem to work and it's skipping these questions where the relevance coding is setup? What am I doing wrong?
Thank you.
So at the start of the survey, we have an equation question which gives each respondent a random number between 1-6. The question is called randnumber
if(is_empty(randnumber), rand(1, 6), randnumber)
Some questions in the survey only show for some respondents (depending on which random number they got at the start). I've set up the relevance on each question accordingly:
randnumber==1
randnumber==2
randnumber=
randnumber==4
randnumber==5
randnumber==6
However, the relevance doesn't seem to work and it's skipping these questions where the relevance coding is setup? What am I doing wrong?
Thank you.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11758
- Thank you received: 2753
5 years 4 months ago #177127
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Relevance coding not working?
Have you checked if randnumber contains a number?
Besides this: Which version of LS are you using?
Besides this: Which version of LS are you using?
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11758
- Thank you received: 2753
5 years 4 months ago #177128
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Relevance coding not working?
Have a look at the demo on Limesurvey.org. I have created a questionnaire called "Randomtest". Works perfectly.
Also here as attachment.
Also here as attachment.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Attachments:
The topic has been locked.
- PaulMRFGR
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 51
- Thank you received: 0
5 years 4 months ago #177161
by PaulMRFGR
Replied by PaulMRFGR on topic Relevance coding not working?
Hey,
Thanks so much for the reply - this worked! I used your survey and managed to work out that it was actually something really stupid (I'd left in a colon on my equation which meant that the random numbers were coming out as etc, so the relevance of randnumber= wasn't picking it up)..
Thank you again!
Thanks so much for the reply - this worked! I used your survey and managed to work out that it was actually something really stupid (I'd left in a colon on my equation which meant that the random numbers were coming out as etc, so the relevance of randnumber= wasn't picking it up)..
Thank you again!
The topic has been locked.