Have an idea?

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

Building one constructed list from multiple variables

I am trying to build a constructed list from multiple variables. Basically as follows:

Respondent answers Q2 (grid question 11 rows & 3 columns)
Then next question they are presented with these options and asked to rate (using a constructed list)

Respondent answers QM2 (grid question 11 rows & 3 columns)
Then next question they are presented with these options and asked to rate (using a constructed list)

Respondent answers QW2 (grid question 11 rows & 3 columns)
Then next question they are presented with these options and asked to rate (using a constructed list)

Respondent answers QF2 (grid question 11 rows & 3 columns)
Thennext question they are  presented with these options and asked to rate (using a constructed list)

Respondent answers QSA2 (grid question 11 rows & 3 columns)
Then next question they are presented with these options and asked to rate (using a constructed list)

EVERYTHING FINE TO THIS POINT

Then, I want to combine the 5 questions so the respondent to be given a choice between all the responses they selected on Q2, QM2, QW2, QF2, QSA2 combined (answer >1).

I thought I could approach this by creating a constructed list with the following instructions:

AIG (Q2,1)
AIG (QM2,1)
AIG (QW2,1)
AIG (QF2,1)
AIG (QSA2,1)

When doing this I'm given errors telling me that the "referenced symbol Q2 (or QM2, etc) does not use the same parent list.

Help??
asked Feb 13, 2017 by Christine Hanley (370 points)
reshown Feb 13, 2017 by Walter Williams

1 Answer

0 votes
If each of the 5 questions use different parent lists, the error you are seeing makes sense. In a constructed list, the parent lists for the specified questions must be the same.

A couple of ways around this depending on the details.

1/ You can create one parent list that includes the 55 codes (11 from each of the 5 questions). Then create one constructed list that uses Perl to reach out to the 5 questions and collect all codes mentioned.
Example:
Begin Unverified Perl

 my $i=1;

 for($i=1; $i<=11; $i++)
  {
   if (VALUE("Q2_r".$i)>1)
    {  
     ADD("BigList",$i);
    }  
 
   if (VALUE("QM2_r".$i)>1)
    {  
     ADD("BigList",$i+11);
    }  

   if (VALUE("QW2_r".$i)>1)
    {  
     ADD("BigList",$i+22);
    }  

   if (VALUE("QF2_r".$i)>1)
    {  
     ADD("BigList",$i+33);
    }  

   if (VALUE("QSA2_r".$i)>1)
    {  
     ADD("BigList",$i+44);
    }  
  }

End Unverified

Note: BigList is the parent list that contains the 55 codes.

Another method is to create a new parent list with 11 codes if the 5 questions use similar type parent lists. Call it QXList.

Then create 5 individual constructed lists as such where each use their respective parent lists ...

Con1List: AIG(Q2,1)
Con2List: AIG(QM2,1)
Con3List: AIG(QW2,1)
Con4List: AIG(QF2,1)
Con5List: AIG(QSA2,1)

We then combine these 5 constructed lists into one constructed  list using QXList as the parent list. This constructed list will use the Mirror function which comes in very handy for constructed lists that use different parent lists.

Mirror(Con1List)
Mirror(Con2List)
Mirror(Con3List)
Mirror(Con4List)
Mirror(Con5List)

Hope that gets you on your way. Get back to me if you get stuck.
answered Feb 13, 2017 by Paul Moon Platinum (61,555 points)
edited Feb 27, 2017 by Paul Moon
Thanks Paul, I think I figured out it moments after posting!
...