Have an idea?

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

Constructed List and Loop - How can I display different text

I have a grid question that leads into a loop.

Grid question:
hhProblems: Rate the extent of the problem for each issue below
     [HouseholdProblemsList]
     Not being able to get medical insurance
     Not being able to pay for medical insurance
     Not being able to pay for the doctor bills
      And so on

I want to do a follow-up on each item >2. That is the easy part. I create a new constructed with the following:

AIG(HHProblems,2)


But, the phrasing in the original list [HouseholdProblemsList] is awkward in the follow-ups questions. So I want to create a new list with different verbiage and display that list:
     [SelectedProblemsList]
     getting medical insurance
     paying for medical insurance
     paying for the doctor bills

I tried creating the      [SelectedProblemsList] with the parent list being HouseholdProblemsList but still using the AIG(HHProblems,2) code and get an error.

I thought I got it working once before but cannot find it.
asked May 5, 2021 by Nwiggin Bronze (1,785 points)
As Brian and Paul have pointed out, the MIRROR function is the way to go.  That has become a fairly regular tool in a lot of my programs.  Once you use it I think you will find it to be a great function.
An alternative is to use conditional Perl Script which can also do a neat job. If the script becomes lengthy with many if-else statements, then the Mirror function is the way to go.

2 Answers

0 votes
I'm not as good at Zach at showing solutions to things like this...but until the king Zach signs in, I'd recommend you look up the Mirror list-building instruction.  This involves creating a copy of your original list, but with the alternate wording.  Then, use the Mirror list-building instruction to create that mirrored list referring to the alternative wording list.
answered May 5, 2021 by Bryan Orme Platinum Sawtooth Software, Inc. (198,815 points)
Yes, we all think Zachary is the king. A nice compliment Bryan, and a deserving one too.
That was perfect. I knew it eixsted and I had done it before, but it has been at least a year or two.
0 votes
There are a number of solutions you can use here. I see Bryan mentioned using the Mirror function which will work nicely.

Create your new parent list (the one with the different wording to display at the next question).

Your constructed list below will use HouseholdProblemsList as the parent ...
AIG(HHProblems,2)

I believe this is called "SelectedProblemsList".

Now create a new constructed list as follows ...
Mirror(SelectedProblemsList)

This will use the new parent list. And let's call it "SelectedProblems2List".

In your question script, you can use something like this to display the result ...
[%ListLabel(SelectedProblems2List,1)%]
answered May 5, 2021 by Paul Moon Platinum (98,770 points)
...