branching in questionnaire problem with skipping question


branching in questionnaire problem with skipping question

Author
Message
Evelien
Evelien
New Member
New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)

Group: Forum Members
Posts: 2, Visits: 8
Hi,

In a questionnaire on drug use I want a follow-up question if the answer to the previous question (checkboxes) is on of a few options and another follow-up question if they reply with another type of drug use.
E.g. if one replies to have used alcohol only, I only want the follow-up questions for alcohol; if one replies to have used nothing, I want them to skip all the follow-up questions and if one replies to have used both alcohol and hard drugs, I want the follow-up questions for both alcohol and hard-drugs. 

I think something goes wrong with the "/ skip=[checkboxes.ZRM11middelen.response!="..alcohol gedronken."], and mainly the != part (the skip ..== script goes perfectly), but I can't see what. 

I attached some of the questions and the surveypage script. 

Hopefully someone can help me out! Thanks!
Evelien






Attachments
questionnaire drug use script.rtf (2 views, 12.00 KB)
Dave
Dave
Supreme Being
Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)

Group: Administrators
Posts: 8.8K, Visits: 36K
Evelien - Monday, April 16, 2018
Hi,

In a questionnaire on drug use I want a follow-up question if the answer to the previous question (checkboxes) is on of a few options and another follow-up question if they reply with another type of drug use.
E.g. if one replies to have used alcohol only, I only want the follow-up questions for alcohol; if one replies to have used nothing, I want them to skip all the follow-up questions and if one replies to have used both alcohol and hard drugs, I want the follow-up questions for both alcohol and hard-drugs. 

I think something goes wrong with the "/ skip=[checkboxes.ZRM11middelen.response!="..alcohol gedronken."], and mainly the != part (the skip ..== script goes perfectly), but I can't see what. 

I attached some of the questions and the surveypage script. 

Hopefully someone can help me out! Thanks!
Evelien






"..alcohol gedronken." (note the dot at the end) is not the response in <checkboxes ZRM11middelen>. The response is "..alcohol gedronken" _without_ any dot at the end:

< checkboxes ZRM11middelen>
/caption = "De volgende stellingen gaan over middelengebruik. In de afgelopen 30 dagen heb ik..: (U mag hier meerdere antwoorden kiezen)"
/ options = ("..alcohol gedronken", "..sigaretten gerookt",
, "..harddrugs gebruikt","..softdrugs gebruikt","..gegokt","..geen van bovenstaande middelen gebruikt. Ik heb ook niet gegokt.")
/orientation = vertical
/required = true
</ checkboxes >

I.e.

/ skip=[checkboxes.ZRM11middelen.response!="..alcohol gedronken."]

cannot work, it needs to read

/ skip=[checkboxes.ZRM11middelen.response!="..alcohol gedronken"]
Evelien
Evelien
New Member
New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)

Group: Forum Members
Posts: 2, Visits: 8
Dave - Monday, April 16, 2018
Evelien - Monday, April 16, 2018
Hi,

In a questionnaire on drug use I want a follow-up question if the answer to the previous question (checkboxes) is on of a few options and another follow-up question if they reply with another type of drug use.
E.g. if one replies to have used alcohol only, I only want the follow-up questions for alcohol; if one replies to have used nothing, I want them to skip all the follow-up questions and if one replies to have used both alcohol and hard drugs, I want the follow-up questions for both alcohol and hard-drugs. 

I think something goes wrong with the "/ skip=[checkboxes.ZRM11middelen.response!="..alcohol gedronken."], and mainly the != part (the skip ..== script goes perfectly), but I can't see what. 

I attached some of the questions and the surveypage script. 

Hopefully someone can help me out! Thanks!
Evelien






"..alcohol gedronken." (note the dot at the end) is not the response in <checkboxes ZRM11middelen>. The response is "..alcohol gedronken" _without_ any dot at the end:

< checkboxes ZRM11middelen>
/caption = "De volgende stellingen gaan over middelengebruik. In de afgelopen 30 dagen heb ik..: (U mag hier meerdere antwoorden kiezen)"
/ options = ("..alcohol gedronken", "..sigaretten gerookt",
, "..harddrugs gebruikt","..softdrugs gebruikt","..gegokt","..geen van bovenstaande middelen gebruikt. Ik heb ook niet gegokt.")
/orientation = vertical
/required = true
</ checkboxes >

I.e.

/ skip=[checkboxes.ZRM11middelen.response!="..alcohol gedronken."]

cannot work, it needs to read

/ skip=[checkboxes.ZRM11middelen.response!="..alcohol gedronken"]

thanks for the quick reply! that was a fairly stupid mistake...

however, if multiple checkboxes are ticked the follow-up questions do not show up either. (e.g. if alcohol only has been selected, the alcohol follow-up question does appear, but if alcohol and harddrugs have been selected no follow-up questions appear at all)

Also, the follow-up question which drug has been used does not appear:

/ skip=[checkboxes.ZRM11middelen.response!="..softdrugs gebruikt" ||
checkboxes.ZRM11middelen.response!="..harddrugs gebruikt"]

Dave
Dave
Supreme Being
Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)

Group: Administrators
Posts: 8.8K, Visits: 36K
Evelien - Monday, April 16, 2018
Dave - Monday, April 16, 2018
Evelien - Monday, April 16, 2018
Hi,

In a questionnaire on drug use I want a follow-up question if the answer to the previous question (checkboxes) is on of a few options and another follow-up question if they reply with another type of drug use.
E.g. if one replies to have used alcohol only, I only want the follow-up questions for alcohol; if one replies to have used nothing, I want them to skip all the follow-up questions and if one replies to have used both alcohol and hard drugs, I want the follow-up questions for both alcohol and hard-drugs. 

I think something goes wrong with the "/ skip=[checkboxes.ZRM11middelen.response!="..alcohol gedronken."], and mainly the != part (the skip ..== script goes perfectly), but I can't see what. 

I attached some of the questions and the surveypage script. 

Hopefully someone can help me out! Thanks!
Evelien






"..alcohol gedronken." (note the dot at the end) is not the response in <checkboxes ZRM11middelen>. The response is "..alcohol gedronken" _without_ any dot at the end:

< checkboxes ZRM11middelen>
/caption = "De volgende stellingen gaan over middelengebruik. In de afgelopen 30 dagen heb ik..: (U mag hier meerdere antwoorden kiezen)"
/ options = ("..alcohol gedronken", "..sigaretten gerookt",
, "..harddrugs gebruikt","..softdrugs gebruikt","..gegokt","..geen van bovenstaande middelen gebruikt. Ik heb ook niet gegokt.")
/orientation = vertical
/required = true
</ checkboxes >

I.e.

/ skip=[checkboxes.ZRM11middelen.response!="..alcohol gedronken."]

cannot work, it needs to read

/ skip=[checkboxes.ZRM11middelen.response!="..alcohol gedronken"]

thanks for the quick reply! that was a fairly stupid mistake...

however, if multiple checkboxes are ticked the follow-up questions do not show up either. (e.g. if alcohol only has been selected, the alcohol follow-up question does appear, but if alcohol and harddrugs have been selected no follow-up questions appear at all)

Also, the follow-up question which drug has been used does not appear:

/ skip=[checkboxes.ZRM11middelen.response!="..softdrugs gebruikt" ||
checkboxes.ZRM11middelen.response!="..harddrugs gebruikt"]

If you need to check for multiple options, the proper syntax would be

<checkboxes mycb>
/ options = ("a", "b", "c")
</checkboxes>

<surveypage mypage>
/ questions = [1=mycb]
</surveypage>

<surveypage a_or_b>
/ skip = [
    !checkboxes.mycb.selected.1 && !checkboxes.mycb.selected.2
]
/ caption = "you should only see this if you selected a or b"
</surveypage>

<block myblock>
/ trials = [1=mypage; 2=a_or_b]
</block>





GO


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search