Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

End URL Condition

  • joeschwab
  • joeschwab's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 5 months ago #221868 by joeschwab
End URL Condition was created by joeschwab
Hello, I am trying to use limesurvey as a screener, and redirect eligible participants to an external url. Those who are not eligible, should not get redirected to the end url. I have found other posts instructing to use a syntax like this in the end url field:

{if(Participate.NAOK==A1, " www.example.com ", "")}

But I get this error at the end of the survey:404 Not Found
Unable to resolve the request "<span class='em-expression em-haveerror' ><span title='Conditional processing; if(test,result_if_true[,result_if_false = &"Any help would be greatly appreciated.

Thanks!
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 5 months ago #221869 by holch
Replied by holch on topic End URL Condition
First of all, try a complete URL including www.example.com .

Also, A1 is a string and so it needs to be something like {if(Participate.NAOK=="A1", " www.example.com ", "")}

And if I recall right, Limesurvey has (or had) some problems when the URL was directly used like this. Not sure what the solution was, but I think it was doing the "calculation" in an equation type question before and then in the END URL just refer to that equation question via {questioncode} or something.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 5 months ago #221873 by holch
Replied by holch on topic End URL Condition
Here a working example. When I put the condition with the URL into the end URL, there seems to be a problem, I guess this is worth a bug report, but as far as I remember the problem exists for quite a while, so I bet there is actually a bug report somewhere already. But I might create one anyway, just to have it.

Please find a working example attached. Just hide the equation type question via "always hide this question" in the advanced settings, once you have finished testing.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 5 months ago #221874 by holch
Replied by holch on topic End URL Condition
And here the bug report:
bugs.limesurvey.org/view.php?id=17715

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
More
2 years 5 months ago #221876 by jelo
Replied by jelo on topic End URL Condition

 but I think it was doing the "calculation" in an equation type question before and then in the END URL just refer to that equation question via {questioncode} or something.
 
Correct.

What LimeSurvey version is used by joeschwab? The "Conditional processing" often can be a simple mistype, so that a variable is not found.
And that is another reason to use a separate equation for generating the EndURL. Easier debugging.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose