Usage of expresions

More
1 week 4 hours ago #157515 by Testrestorest
Testrestorest created the topic: Usage of expresions
Hello, everyone! I am new to LimeSurvey, can someone please help me with following expressions:

If question "11" is "a" and if question "21" is "a" then question "22" will not show
If question "12" is not "a" not "d" and question "24" is not "f" then question "28" will not show
If question "24" is "g" then question "30" will show
If question "1" is "a" then questions "7", "8","18", "24-31" will be skipped
If question "2" is 'b' question "11" will be locked with "a"
if question "3" is 'd' then question '6' will display different text and possible answers
if question "4" is 'd' then question '6' will display different text
if question "5" is 'd' then question '6' will display different answers

Please Log in to join the conversation.

More
1 week 3 hours ago - 1 week 3 hours ago #157521 by Joffm
Joffm replied the topic: Usage of expresions
Hi,
if you are going to use a lot of expressions, you should have read the section about expressions in the manual
and studied the sample surveys, e.g. https://manual.limesurvey.org/images/d/de/Ls2_em_tailoring.lss

Well, just one hint:

If question "11" is "a" and if question "21" is "a" then question "22" will not show

Assuming Q11 and Q21 are single response and "a" is the code of the answer option:
Relevance of Q22 set to: (Q11!="a") AND (Q21!="a"))

If question "12" is not "a" not "d" and question "24" is not "f" then question "28" will not show
If question "24" is "g" then question "30" will show
If question "1" is "a" then questions "7", "8","18", "24-31" will be skipped

More or less analogue.

If question "2" is 'b' question "11" will be locked with "a"

??? If the "a" is forced and single response, Don't show the question, set the "a" in an equation like {Q11="a"}

If question "4" is 'd' then question '6' will display different text

See https://manual.limesurvey.org/Expression_Manager#Tailoring.2FPiping
Use something like:
{if(Q4.NAOK=="b", "This is answer text 1", "This is the other answer text")}

if question "3" is 'd' then question '6' will display different text and possible answers
if question "5" is 'd' then question '6' will display different answers

If only the wording of the answers is changed, again Tailoring/Piping, else it depends on the question type:
single response question don't have relevance of answer options you have to create different questions and display them according to the answer in the other question), multi response questions have.


Best regards
Joffm
Last Edit: 1 week 3 hours ago by Joffm.

Please Log in to join the conversation.

More
6 days 18 hours ago #157530 by Joffm
Joffm replied the topic: Usage of expresions
Short addition:

If question "2" is 'b' question "11" will be locked with "a"


To be more exact:
{Q11=(if(Q2=="b","a",22))}

See here:
https://www.limesurvey.org/forum/can-i-do-this-with-limesurvey/112144-pre-fill-or-set-default-answer-to-list-radio-question-based-on-previous-answer

Joffm

Please Log in to join the conversation.

Did you already participate in our customer survey?

Don't miss your chance for great prices.

Please click here to participate:

Start now

Start now!

Just create your account and start using Limesurvey today.

Register now