- Posts: 5033
- Thank you received: 1257
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
EM inside EndURL / Y 'Y' "Y" undefined variable in if(q01_A1.NAOK == Y, 1, 0)
- jelo
- Topic Author
- Offline
- Platinum Member
Less
More
8 years 8 months ago #123750
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
EM inside EndURL / Y 'Y' "Y" undefined variable in if(q01_A1.NAOK == Y, 1, 0) was created by jelo
Is there a bug in 2.05/2.06 about using e.g. if(q01_A1.NAOK == "Y", "1", "0") inside the End-URL?
Looks like the URL formatting/check routines removing all quotes inside the EM Code too,
After saving and reentering the End-URL field the Code is if(q01_A1.NAOK == Y, 1, 0) without quotes.
And QA is claiming that Y is an undefined variable.
Can anybody confirm that issue?
Looks like the URL formatting/check routines removing all quotes inside the EM Code too,
After saving and reentering the End-URL field the Code is if(q01_A1.NAOK == Y, 1, 0) without quotes.
And QA is claiming that Y is an undefined variable.
Can anybody confirm that issue?
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
8 years 8 months ago #123773
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic EM inside EndURL / Y 'Y' "Y" undefined variable in if(q01_A1.NAOK == Y, 1, 0)
I can't find the post now but it seems to me that I came upon something similar in the forums recently. I think the solution was to place the end URL (with variable parameters) in an equation type question and then pipe the equation question code into the End URL field.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- jelo
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
8 years 8 months ago #123777
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic EM inside EndURL / Y 'Y' "Y" undefined variable in if(q01_A1.NAOK == Y, 1, 0)
Thanks Tony,
that would mean that there is a bug/issue.
The way, the EndURL field is documented and threads of the last few years showed, that it was possible to use IF and quotes without problems.
The workaround can only be applied in nonactive surveys.
Will try to find the thread and perhaps there is a bugreport already in the tracker.
Thanks to your brain I have a trace to search for.
that would mean that there is a bug/issue.
The way, the EndURL field is documented and threads of the last few years showed, that it was possible to use IF and quotes without problems.
The workaround can only be applied in nonactive surveys.
Will try to find the thread and perhaps there is a bugreport already in the tracker.
Thanks to your brain I have a trace to search for.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11639
- Thank you received: 2737
8 years 8 months ago #123793
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic EM inside EndURL / Y 'Y' "Y" undefined variable in if(q01_A1.NAOK == Y, 1, 0)
I actually find the solution to the problem more elegant anyway, because it would also store what has been passed on and I think the compute time is probably a lot quicker at the end for the endurl.
No matter if bug or not: What are your opinions? When doing so, would you recommend rather going for the equation anyway (especially when more statements are involved, I guess it is worth it).
No matter if bug or not: What are your opinions? When doing so, would you recommend rather going for the equation anyway (especially when more statements are involved, I guess it is worth it).
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.
- jelo
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
8 years 8 months ago #123801
by jelo
It is bug. That matters, because such regressions are a pain in the a**. The forum and the documentation are full of posts, where the enduser is told, to do it that way. The label "stable" is given too fast to new versions.
As long as you cannot add questions during an activated survey, the ENDURL field is the only way to do EM.
If you are planing URL changes during the design phase, you will often use additional equations questions to remove the clutter in the EndURL-field.
For everybody else who wants a workaround till this bug exists:
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic EM inside EndURL / Y 'Y' "Y" undefined variable in if(q01_A1.NAOK == Y, 1, 0)
holch wrote: No matter if bug or not: What are your opinions?
It is bug. That matters, because such regressions are a pain in the a**. The forum and the documentation are full of posts, where the enduser is told, to do it that way. The label "stable" is given too fast to new versions.
As long as you cannot add questions during an activated survey, the ENDURL field is the only way to do EM.
If you are planing URL changes during the design phase, you will often use additional equations questions to remove the clutter in the EndURL-field.
For everybody else who wants a workaround till this bug exists:
Code:
Instead of {if(q01_A1.NAOK == "Y", 1, 0)} use: {if(!is_empty(q01_A1.NAOK),1, 0)}
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11639
- Thank you received: 2737
8 years 8 months ago #123807
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic EM inside EndURL / Y 'Y' "Y" undefined variable in if(q01_A1.NAOK == Y, 1, 0)
Hey Jelo, this wasn't my intention. I didn't want to go into Bug/no bug.
Totally apart from this, I was wondering if it is not better to do it the way Tpartner describes (totally independent if the feature works or doesn't work in the end url).
Just that. No discussion if it is a bug or not. I guess it is one. But I have no idea, because I haven't tried it. Just wondering about what the best procedure in these cases is and if it wouldn't be better to generate the information already before in an equation and then add it to the endurl or if this.
Even if there is a workaround, I agree that a bug needs to be fixed. But that was not my question. We can always question a feature, and its best use, can't we?
Totally apart from this, I was wondering if it is not better to do it the way Tpartner describes (totally independent if the feature works or doesn't work in the end url).
Just that. No discussion if it is a bug or not. I guess it is one. But I have no idea, because I haven't tried it. Just wondering about what the best procedure in these cases is and if it wouldn't be better to generate the information already before in an equation and then add it to the endurl or if this.
Even if there is a workaround, I agree that a bug needs to be fixed. But that was not my question. We can always question a feature, and its best use, can't we?
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.
- jelo
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
8 years 8 months ago #123810
by jelo
I would always use equation questions and only place variables inside such small textboxes e.g EndURL.
But since there is no chance to add questions to the running survey, the direct usage of EM inside the field is often the only solution. I wonder if LS 3.0 is designed to allow adding questions to a running survey.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic EM inside EndURL / Y 'Y' "Y" undefined variable in if(q01_A1.NAOK == Y, 1, 0)
I got your intention right. Don't worry. I target the readonly audience and future search audience tooholch wrote: Hey Jelo, this wasn't my intention. I didn't want to go into Bug/no bug.
I would always use equation questions and only place variables inside such small textboxes e.g EndURL.
But since there is no chance to add questions to the running survey, the direct usage of EM inside the field is often the only solution. I wonder if LS 3.0 is designed to allow adding questions to a running survey.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11639
- Thank you received: 2737
8 years 8 months ago #123812
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic EM inside EndURL / Y 'Y' "Y" undefined variable in if(q01_A1.NAOK == Y, 1, 0)
I doubt that, because it is not a bug but a feature, from what I heard.
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.
- jelo
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
8 years 7 months ago #123951
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic EM inside EndURL / Y 'Y' "Y" undefined variable in if(q01_A1.NAOK == Y, 1, 0)
I voted for bug.
bugs.limesurvey.org/view.php?id=9837
bugs.limesurvey.org/view.php?id=9837
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11639
- Thank you received: 2737
8 years 7 months ago #123952
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic EM inside EndURL / Y 'Y' "Y" undefined variable in if(q01_A1.NAOK == Y, 1, 0)
My "not a bug but a feature" was target to "allowing to add questions to a running survey", by the way. Just if that wasn't clear. Because reading it now I needed some time myself to see why I said it's a feature.
I think the decision not to allow adding questions to a running survey was made on purpose. I guess it should avoid problems with the database and missing values, etc.
I am currently not quite sure how this works in other survey tools. Maybe you can shed a light here. I mainly know (or better "knew") Globablpark / Questback, but I was never involved in the actual programming, etc. Just did smaller changes.
I think the decision not to allow adding questions to a running survey was made on purpose. I guess it should avoid problems with the database and missing values, etc.
I am currently not quite sure how this works in other survey tools. Maybe you can shed a light here. I mainly know (or better "knew") Globablpark / Questback, but I was never involved in the actual programming, etc. Just did smaller changes.
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.
- jelo
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
8 years 7 months ago #123964
by jelo
I won't expect LS to allow editing question during an interview. The programmer team won't see any purpose in that. I still wonder what user-cases they follow. Different world.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic EM inside EndURL / Y 'Y' "Y" undefined variable in if(q01_A1.NAOK == Y, 1, 0)
We are out of sync. I was on-topic and the bug-report is about the filtering of the quotes.holch wrote: My "not a bug but a feature" was target to "allowing to add questions to a running survey", by the way. Just if that wasn't clear. Because reading it now I needed some time myself to see why I said it's a feature.
I won't expect LS to allow editing question during an interview. The programmer team won't see any purpose in that. I still wonder what user-cases they follow. Different world.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11639
- Thank you received: 2737
8 years 7 months ago #123968
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic EM inside EndURL / Y 'Y' "Y" undefined variable in if(q01_A1.NAOK == Y, 1, 0)
I noticed that we are out of sync. That's why I made the comment. Not that you think I consider the EM inside EndURL problem a feature.
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.