- Posts: 23
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
display multiple values on if condition
- bajpai
- Topic Author
- Offline
- Junior Member
Less
More
2 years 9 months ago #217018
by bajpai
display multiple values on if condition was created by bajpai
Hi,
I have a table in LimeSurvey question text, where I have to show all the 5 sub-question values (A1, A2, A3, A4, A5) along with the sub-question text of a array(number) question L42024PriceA_Q1, highlighted below in yelllow, on a condition.
Condition is :
if the random value generated(random1_SQ001) is equal to 1, then show all 10 values, the 5 fixed as subquestion text
and other 5 filled in by respondent as L42024PriceA_Q1_A1, L42024PriceA_Q1_A2, L42024PriceA_Q1_A3, L42024PriceA_Q1_A4 and L42024PriceA_Q1_A5
the issue is applying the IF condition :
I can only show one of those values in the following syntax:
{if((random1_SQ001==1),L42024PriceA_Q1_A1.shown)} - this works
Do you know what would be the syntax to show all 5 values?
{(if((random1part3gp1==1),L42024PriceA_Q1_A1.shown))L42024PriceA_Q1_A2.shown,L42024PriceA_Q1_A3.shown, L42024PriceA_Q1_A4.shown, L42024PriceA_Q1_A5.shown} - this does not work
thank you!
I have a table in LimeSurvey question text, where I have to show all the 5 sub-question values (A1, A2, A3, A4, A5) along with the sub-question text of a array(number) question L42024PriceA_Q1, highlighted below in yelllow, on a condition.
Condition is :
if the random value generated(random1_SQ001) is equal to 1, then show all 10 values, the 5 fixed as subquestion text
and other 5 filled in by respondent as L42024PriceA_Q1_A1, L42024PriceA_Q1_A2, L42024PriceA_Q1_A3, L42024PriceA_Q1_A4 and L42024PriceA_Q1_A5
the issue is applying the IF condition :
I can only show one of those values in the following syntax:
{if((random1_SQ001==1),L42024PriceA_Q1_A1.shown)} - this works
Do you know what would be the syntax to show all 5 values?
{(if((random1part3gp1==1),L42024PriceA_Q1_A1.shown))L42024PriceA_Q1_A2.shown,L42024PriceA_Q1_A3.shown, L42024PriceA_Q1_A4.shown, L42024PriceA_Q1_A5.shown} - this does not work
thank you!
The topic has been locked.
- bajpai
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 23
- Thank you received: 0
2 years 9 months ago #217019
by bajpai
Replied by bajpai on topic display multiple values on if condition
I resolved the condition with following code:
{if(((R1_SQ001==1) OR (R1_SQ002==1)),(L42024PriceA_Q1_A1.shown, L42024PriceA_Q1_A2.shown,L42024PriceA_Q1_A3.shown,L42024PriceA_Q1_A4.shown,L42024PriceA_Q1_A5.shown))}
{if(((R1_SQ001==1) OR (R1_SQ002==1)),(L42024PriceA_Q1_A1.shown, L42024PriceA_Q1_A2.shown,L42024PriceA_Q1_A3.shown,L42024PriceA_Q1_A4.shown,L42024PriceA_Q1_A5.shown))}
The topic has been locked.
- bajpai
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 23
- Thank you received: 0
2 years 9 months ago #217020
by bajpai
Replied by bajpai on topic display multiple values on if condition
The topic has been locked.
- bajpai
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 23
- Thank you received: 0
2 years 9 months ago #217023
by bajpai
Replied by bajpai on topic display multiple values on if condition
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11758
- Thank you received: 2753
2 years 9 months ago #217027
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 display multiple values on if condition
Please do not open various questions for the same thing.
Try using ".shown" instead of ".question" and see what happens.
Try using ".shown" instead of ".question" and see what happens.
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.
- bajpai
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 23
- Thank you received: 0
2 years 9 months ago #217041
by bajpai
Replied by bajpai on topic display multiple values on if condition
Thank you, sure. I will keep that in mind.
The topic has been locked.