Welcome to the LimeSurvey Community Forum

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

relevance not working with hidden variable from URL

  • suselko
  • suselko's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 9 months ago #201771 by suselko
I have a survey where each respondent is given a unique invitation key, like 'abc'. The key forms part of the URL, e.g. i-sphere.limequery.com/735487?key=abc&lang=en
The key gets stored in the hidden 'key' variable at the beginning of the survey but for some reason the routing that refers to that 'key' variable (the last question) does not work. The survey is attached. Copy the link above and paste it into your web browser, then select the last response to the first question to see what I mean. Thanks in advance for pointing me in the right direction.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 9 months ago #201778 by DenisChenu
Strange …
«This is not a valid LimeSurvey survey structure XML file.»

But seems OK, can you import it yourself ?

Else : can you show a screenshot of your last question logic

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • suselko
  • suselko's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 9 months ago #201792 by suselko
Thanks Denis. Strange indeed - I get the error too when trying to import the lss file. The screenshot is attached.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 9 months ago - 3 years 9 months ago #201793 by Joffm
Hi,

if I select the last response I am not asked the "smartphone" question.
Is this correct?
If yes, your equation is wrong:
The "smartphone" is undefined
paymenttype==5 and (smartphone==1 or key!="") will fail.
In this case you have to use "smartphone.NAOK"

Always the best:
Display the value of your variables and the result of your equation in a question of type "text display".
Here you see, if and where you have some mistakes.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 9 months ago by Joffm.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • suselko
  • suselko's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 9 months ago #201794 by suselko
Thanks a lot Joffm, that worked! I have come across that .NAOK stuff somewhere in the documentation but found it all obscure. Understand now.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 9 months ago #201795 by DenisChenu
Always add .NAOK :)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • suselko
  • suselko's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 9 months ago #201797 by suselko
Sorry, a follow-up question: do I use .NAOK only for relevance, or also in equation-type questions? E.g. will the following equation work without .NAOK? {if(paymenttype==5 and (smartphone==1 or key!=""),"something","something else")}
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 9 months ago #201798 by DenisChenu
I'm not thinking: I'm always adding .NAOK

bugs.limesurvey.org/view.php?id=14818

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
More
3 years 9 months ago #201822 by jelo

DenisChenu wrote: I'm not thinking: I'm always adding .NAOK

If there is no case to NOT add NAOK why not change the default behavior in LimeSurvey. Saves a lot of NAOKs ;-)

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 9 months ago #201832 by DenisChenu
Dis you read the mantis link … i have this project …

And more : no usage of NAOK : different behaviour between JS and PHP

See : bugs.limesurvey.org/view.php?id=14932

And more : count(self) : false if one self is empty, but count(self.NAOK) return 1 if one checked …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • suselko
  • suselko's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 9 months ago #201944 by suselko
I'm with Denis on this. Having to add .NAOK is counter-intuitive and user-unfriendly. It should be the other way round, add .NANOTOK if you mean it. As it stands, I have two unattractive choices: (a) add .NAOK where I think it should be added - but if I get it wrong and my testing does not detect it (as it happened in the case of this particular survey), I end up missing responses; (b) do what Denis does and add .NAOK everywhere - but this makes the code harder to read and thus harder to quickly spot errors.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose