Have an idea?

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

Value of variable associated to unanswered questions

I have a survey that has say 3 questions : Q1, Q2 and Q3. Suppose that a respondent get only Q3 and when I ask Q3 I need to know if Q2 was unanswered.

If I write in the logic: Q2 = "" this is wrong and Q2 = 0 is not right . How can I know if this question is unanswered ? What is the value connected to an answered question ?

Please note I have also run a javascript alert and I made sure that the value is not null, "" or void(0).

Do you have any clue ?

Many thanks.

asked Jul 2, 2012 by anonymous
retagged Sep 13, 2012 by Walter Williams

1 Answer

0 votes
Use answered(q2) function. Its documentation is in help as well

There's also shown() if you're ingerested
answered Jul 2, 2012 by Bahadir Ozkurt Gold (16,980 points)
Can I use this answered(q2) in the javascript code ?

So I can write in javascript :

if (answered(q2)) {

do stuff

Or do I have to use something like: SSI_answered(q2)? Cannot find the customized functions in the help. Can you tell me where they are ? Thank you
Hmmm, I'm not sure about javascript function, but the following should work in nany case,

If([%q2%] ==" ")

For some reason ssi retreves a space for emptt questions in javascript. That's a recent experince