Have an idea?

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

Is it possible to add stricter rules such as removing those who answered none 10 or more times?

Is it possible to add more rules? I have 20 questions and I'd like to remove those who selected none as a majority of their answers. Can I set it up to remove those who selected none 11 or more times?
asked Jan 21 by kbroich (180 points)

1 Answer

0 votes
This script will set the pass-in field to the number of tasks where the none concept was selected:

[% Begin Unverified Perl
# Parameters
my $exerciseName = 'cbc';
my $randomTasks = 10;
my $fixedTasks = 0;
my $noneConcept = 3;
my $passInField = 'pif';
 
# Run
my $nones = 0;
 
for (my $i = 1; $i <= $randomTasks; $i++) {
    if (GETVALUE($exerciseName . '_Random' . $i) == $noneConcept) {
        $nones++;
    }
}
 
for (my $i = 1; $i <= $fixedTasks; $i++) {
    if (GETVALUE($exerciseName . '_Fixed' . $i) == $noneConcept) {
        $nones++;
    }
}
 
SETVALUE($passInField, $nones);
End Unverified %]


That line near the end could be replaced with something like this to have the pass-in field be 1 if a certain threshold is reached or 0 if it is not met:

SETVALUE($passInField, $nones > 10 ? 1 : 0);
answered Jan 21 by Zachary Platinum Sawtooth Software, Inc. (153,100 points)
...