Have an idea?

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

How to terminate survey based on question name?

I have created a simple single select type question in SSI Web 8.2.4. I've named this question QTG1. I simply want to terminate if
QuestionName() = "QTG1"
It doesn't work.

Seems like the function QuestionName() is not returning any value in the skip logic. While, if I put this function in Header1, it returns the current question name.

Any suggestions on how can I return the QuestionName() in skip logic?
asked Apr 9, 2015 by Niks Bronze (620 points)

2 Answers

+1 vote
Niks, try the following ...
QuestionName() eq "QTG1"

You need to correct your operator for a string variable.
answered Apr 9, 2015 by Paul Moon Platinum (55,975 points)
Good news. I will test this out when I return from holidays next week and pass feedback onto the Sawtooth folk.
Hi Paul! Any update on this?
I tested pre and post skips with QuestionName() and it worked fine?
Did you check this using SSI Web 8.2.4?
All testing was conducted on v8.3.6 and v8.3.10.

I did spot this bug ...

SSI Web 8.3.8 (1 Oct 2014)
The SSI Script [%SetValue(varname, QuestionName())%] would fail. QuestionName() was being called twice and the second time it would return empty.

Because I haven't seen your program, I can't see all the features you are using together?
0 votes
Hi Niks,

Your question regarding terminating the respondent is not clear. Please elaborate the terminate condition.

Does it mean that all respondents answering QTG1 should be terminated after giving response?

If yes, then apply always skip to terminate page after QTG1.

Otherwise, there should be a condition from a response of qTG1 basis which you wish to terminate.

We will be happy to help once you share the actual termination condition.

Regards,
Saurabh
answered Apr 9, 2015 by Saurabh Aggarwal Gold (27,605 points)
Hi Saurabh. The actual problem is I want to return QuestionName() dynamically in a post skip condition. The scenario I have taken in my question above is just an example. What I actually want to do is something different. If I'm able to get value of my current question name using the SSI function QuestionName() in the post skip condition, it serves my purpose.
...