Have an idea?

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

Matching a number to a sum

I have 2 questions:
Q1. How many trips have you taken in last 12 months? In this the respondent types a number

Q2. How many of the [Q1 answer) trips you took were booked with the following companies? Enter a whole number for each. If none, write 0.

For Q2, I'm using a constant sum question format, but the sum doesn't have to add to 100. It has to be less or equal to the response in Q1.

I'm using SSIWeb 8.1.4.

How can I accomplish this?
asked Dec 11, 2012 by anonymous

1 Answer

+1 vote
If these are not on the same page, you can just enter [%Q1%] as the sum instead of 100. If they have to be on the same page, you will need to use some javascript to check Q1 and Q2 answers and only allow going forward if it matches your conditions.
answered Dec 11, 2012 by Bahadir Ozkurt Gold (17,010 points)
As a tip -- anywhere in the software you see the "pencil icon" next to a numeric input, you can use [% ... %] and enter SSI Script for the input like Bahadir shows above.
I would also enter "0" as the AMOUNT ABOVE THE TOTAL VALUE ALLOWABLE AND "[%Q1%]" as the AMOUNT UNDER THE TOTAL VALUE ALLOWABLE. This will satisfy the conditions you mentioned for the total figure. These settings can be found within the constant sum question under advanced / constant sum settings.