Have an idea?

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

how to create dummy (hidden) question that executes

Is there a way to create a hidden question that gets executed (maybe with some js or SSI function in it), but does not present to the user for input.  The user never knows it is there.

Yes, I can put the code in another (real) question, but I want to use skips to go to one dummy question or another one.

asked Oct 11, 2015 by cseitz (290 points)

2 Answers

0 votes
Carol, here's a solution ...

Hit the KEY button and go to the Pass-In Fields tab.

Define a variable. You have the choice of defining the type as Text / Whole Number / Decimal Number.

In this example, let's assume I have defined a variable called "Customer" as type Whole Number.

You can use an SSI Script function called SetValue to assist.

If it is just a simple set the "Customer" variable to a "1" you would pop this script into the footer of one of your questions. Be careful that the question is not being skipped if you want all surveys to have the "Customer" variable updated correctly.

If you need a conditional type example where Customer=1 if Q1>99, otherwise Customer=2, check this out ...
[%Begin Unverified Perl
if (VALUE("Q1")>99)
End Unverified%]
answered Oct 11, 2015 by Paul Moon Platinum (67,375 points)
Thanks, but the answer has nothing to do with my question.  I suspect it  is related to ANOTHER question I asked :))
Apologies. I thought you wanted to perform some sort of calculation "behind the scenes where the respondent does not see it" and store the answer away in a hidden variable? I used the SetValue method. You can also create a free format hidden variable and pop that onto a question page. This will perform the same result.
0 votes
You can use Free format Question for this Querry
answered Oct 29, 2015 by Nouman Saeed Bronze (860 points)