Check out the LimeSurvey source code on GitHub!

Expressenmanager to change Exit-URL depending on answer

More
4 years 10 months ago #76620 by bomellunder
Hi,

To change the end URL depending on an answer in the survey, I used to use the GATE function and it worked fine until now:

myurl.com/redirect/survey?{GATE:result=(...d={SAVEDID}&sid={SID }

But it is not supported anymore. How would this look like using the Expression manager?

If Answer 25653X2X66 was "yes" he was redirected to
myurl.com/redirect/survey?success&hash={...d={SAVEDID}&sid={SID }

if it was anything else he was directed to the other URL.

Thank you for your help!!

Please Log in to join the conversation.

More
4 years 10 months ago #76625 by TMSWhite
{GATE} is no longer supported because it has been replaced by Expression Manager.

You would to this instead:
myurl.com/redirect/survey?{if(INSERTANS:25653X2X66=='Yes','success','failed')}&hash={TOKEN}&id={SAVEID}&sid={SID}

I assume you're using a yes/no question. Let's say it is called "ok", here are two other ways of doing the same thing:
myurl.com/redirect/survey?{if(25653X2X66=='Y','success','failed')}&hash={TOKEN}&id={SAVEID}&sid={SID}
myurl.com/redirect/survey?{if(ok=='Y','success','failed')}&hash={TOKEN}&id={SAVEID}&sid={SID}

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form