Constructing Parent and Child Lists

Last Updated: 12 May 2014Hits: 6517
Below are two questions from an SSI Web survey. How do I create a constructed list to build the drop-down boxes for these questions? Q1. At what price is this product starting to get expensive but you would still consider buying it? (INSERT DROP DOWN MENU OF PRICES RANGING FROM $5,000 TO $2,500 AT $100 INCREMENTS. INCLUDE "LESS THAN $2,500".) Q2. At what price is this product too expensive that you wouldn't consider buying it? (INCLUDE DROP DOWN MENU OF PRICES FROM Q1 WITH ALL PRICES HIGHER THAN ANSWER AT Q1. INCLUDE "MORE THAN $5,000".)

First, you need to create a master predefined list with all of the items on it. Let's call it masterList. It will contain the following items:

  1. MORE THAN $5,000
  2. $5,000
  3. $4,900
  4. $4,800
  5. $4,700
  6. $4,600
  7. $4,500
  8. $4,400
  9. $4,300
  10. $4,200
  11. $4,100
  12. $4,000
  13. $3,900
  14. $3,800
  15. $3,700
  16. $3,600
  17. $3,500
  18. $3,400
  19. $3,300
  20. $3,200
  21. $3,100
  22. $3,000
  23. $2,900
  24. $2,800
  25. $2,700
  26. $2,600
  27. $2,500
  28. LESS THAN $2,500

Next, we need to add the Q1 question. Create a select/dropdown question that uses a new constructed list. Call the list Q1List. It is based on the parent list of masterList. The list-building syntax you would use is:

ADD (masterList, 2, 28)

This simply adds items 2 through 28 to the list. If you were to take the survey and answer this question by selecting $4,000, the value of 12 would be stored in Q1.

Finally, create the Q2 question. This will be another select/dropdown question that uses a new constructed list. Call the list Q2List. It is also based on the parent list masterList. The list-building logic you need to use is:

ADD (masterList) LISTMAX (Q1-1)

The first line adds all of the items from masterList. The second line limits the size of that list to whatever the value that was selected in Q1, minus 1. In this case, if you selected $4,000 in Q1, the value of Q1 would be 12, subtracting 1 makes it 11, which means that the list will start at item #1 and end with item #11, or $4,100.