Welcome, Guest
Username: Password: Remember me

TOPIC: Expressenmanager to change Exit-URL depending on answer

Expressenmanager to change Exit-URL depending on answer 2 years 4 months ago #76620

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!!
The administrator has disabled public write access.

Re: Expressenmanager to change Exit-URL depending on answer 2 years 4 months ago #76625

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
{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}
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.283 seconds
Donation Image