Have an idea?

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

"Fallback" option if nothing selected by respondent

Hello, I have a problem with the following scenario and was hoping someone could help! I have a grid question formatted like below.

     Unfamiliar    Fam- wc     Fam-wnc
A1         o              o              o     
A2         o              o              o   
B1         o              o              o   
B2         o              o              o   
B3         o              o              o   
B4         o              o              o   
C1         o              o              o   
C2         o              o              o   
C3         o              o              o   
D1         o              o              o   
D2         o              o              o   
D3         o              o              o   

A1 & A2 are one type, B1-B4 is another type, etc. The responses from the grid help populate a field in a conjoint analysis. If the respondent says she is either “fam-wc” or “fam-wnc” A1, A2, or both, then those responses are included in the conjoint and randomly assigned. That all works. The problem is if the respondent says she is not familiar with either A1 or A2. Then I’d like to assign A1 to fill the conjoint.  This is what I have in my constructed list.
Begin Unverified Perl
if{ (VALUE('QuestionName_r1')<2) &&  VALUE('QuestionName_r2') <2)} return "A1?"; End Unverified  Randomize()

If I leave out the Unverified Perl, then there’s just a blank in the conjoint where the name should be. With the Unverified Perl, an error message comes up. Does anyone know how to fix this problem?

Thanks so much!
asked Jun 21, 2018 by AJR
edited Jun 21, 2018

1 Answer

0 votes
Constructed list instructions only serve to add items from the parent list to the constructed list.  Because of this, your return statement won't do anything.  Instead, you need to use the "ADD" function to add that item from the parent list.

Also, your brace characters { and } ought to be parentheses.

Try this:

Begin Unverified Perl
if((VALUE('QuestionName_r1')<2) && VALUE('QuestionName_r2') <2)) {
    ADD(list1, 1);
End Unverified

"list1" must be replaced with the name of the list with the "A1" item.
answered Jun 22, 2018 by Zachary Platinum Sawtooth Software, Inc. (120,900 points)