- Posts: 2
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
show group depending on answer to multiple-choice question
- danutz
- Topic Author
- Offline
- New Member
Less
More
10 years 5 months ago - 10 years 5 months ago #102298
by danutz
show group depending on answer to multiple-choice question was created by danutz
Hi,
I have a mulitple-choice question (gq1) with two possible answers (coded A1 and A2). I want to show question group S if A1 is selected, and group P if A2 is selected.
I used the relevance equations gq1.code == 'A1' (for S) and gq1.code == 'A2' (for P). Neither S nor P are shown. What am I doing wrong? Are there any examples for this kind of stuff in the documentation?
I have a mulitple-choice question (gq1) with two possible answers (coded A1 and A2). I want to show question group S if A1 is selected, and group P if A2 is selected.
I used the relevance equations gq1.code == 'A1' (for S) and gq1.code == 'A2' (for P). Neither S nor P are shown. What am I doing wrong? Are there any examples for this kind of stuff in the documentation?
Last edit: 10 years 5 months ago by danutz.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10116
- Thank you received: 3597
10 years 4 months ago #102314
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic show group depending on answer to multiple-choice question
Try:
And:
Code:
gq1_A1 == 'Y'
And:
Code:
gq1_A2 == 'Y'
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: danutz
The topic has been locked.
- danutz
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
10 years 4 months ago #102337
by danutz
Replied by danutz on topic show group depending on answer to multiple-choice question
Thanks. Are there any helpful docs were this can be learned? I read the Expression Manager guide and I didn't find it.
I think there's a problem with my installation, because I generated a new survey with two normal groups (no relevance eq) and only the 1st group is shown, then the survey ends. If I make questions in the 2nd group mandatory, I get errors when submitting the 1st question (saying mandatory qs have not been answered). Perhaps because I'm using Postgres? I'
I think there's a problem with my installation, because I generated a new survey with two normal groups (no relevance eq) and only the 1st group is shown, then the survey ends. If I make questions in the 2nd group mandatory, I get errors when submitting the 1st question (saying mandatory qs have not been answered). Perhaps because I'm using Postgres? I'
The topic has been locked.