Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Skip Logic Issue for Single question

Dear Support,

I have 7 questions :
- K1 : Multiple Answer
- M2 :Multiple Answer
-M3 :Single Answer
-MC11, MP11 and UK11: Single Answer
and  DU that I need  to apply this logic on :

Ask only if at least two of the following apply:
3 is coded in K1
1 is coded in M2
2 is coded M3
AND
If same brand is coded in across MC11, MP11 and UK11 (If one of these questions are not asked then same brand must be coded across two of the three questions)


How can i do it please ?

Thanks.
asked Aug 7, 2019 by Marwa Rahmy

1 Answer

0 votes
Create a predefined list with only one item, then create a constructed list and place this code
Begin Unverified Perl
my $var = 0;

if (NUMCHECKED("K1") == 3) {
    $var++;
}
if (NUMCHECKED("M2") == 1) {
    $var++;
}
if (NUMCHECKED("M3") == 2) {
    $var++;
}

if ($var >=2 && VALUE('MC11') == VALUE('MP11') && VALUE('MP11') == VALUE('UK11'))
{
ADD("TestList",1)
}

End Unverified


Place this skip logic at DU

Not ListHasParentMember(TestConList,1)


Make sure to update the predefined and constructed list names in the codes
answered Aug 7, 2019 by Abdul Bronze (3,220 points)
...