Gentlemen, good morning.
Currently using Sawtooth Software, version 8.4.8.
Here's the following situation:
In one of our multiple choice questions, which leads to the creation of a list for a single respose question, there is the possibility of checking only one option (apart from "None of the above"). In case the respondent checks only one option, I would like to set this column's index as the value in the single response question.
Where do I place the commands, given the fact that the single response question is a quota?
I have tried something like this:
1) Create a Pass-in field named "First Choice";
2) Try the commands below:
Begin Unverified Perl
my $brand = 0;
for ($i = 1; $i <= LISTLENGTH("marcasV2"); $i++)
{
if (LISTHASPARENTMEMBER("List",$i) && NUMCHECKED("Multiple") == 1 && GETVALUE("Multiple_".$i)==1)
{$brand = $i;}
else {$brand = 0;}
}
SETVALUE("FirstChoice",$brand)
End Unverified
Thanks a lot for your time.
Best,
Mauricio.