- Posts: 26
- Thank you received: 0
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
- Topic Author
- Offline
- Junior Member
Less
More
3 years 9 months ago #201771
by suselko
relevance not working with hidden variable from URL was created 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 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.
Attachments:
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
3 years 9 months ago #201778
by DenisChenu
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.
Replied by DenisChenu on topic relevance not working with hidden variable from URL
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
«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
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 26
- Thank you received: 0
3 years 9 months ago #201792
by suselko
Replied by suselko on topic relevance not working with hidden variable from URL
Thanks Denis. Strange indeed - I get the error too when trying to import the lss file. The screenshot is attached.
Attachments:
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12790
- Thank you received: 3940
3 years 9 months ago - 3 years 9 months ago #201793
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic relevance not working with hidden variable from URL
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
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
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 26
- Thank you received: 0
3 years 9 months ago #201794
by suselko
Replied by suselko on topic relevance not working with hidden variable from URL
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
3 years 9 months ago #201795
by DenisChenu
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.
Replied by DenisChenu on topic relevance not working with hidden variable from URL
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
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 26
- Thank you received: 0
3 years 9 months ago #201797
by suselko
Replied by suselko on topic relevance not working with hidden variable from URL
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
3 years 9 months ago #201798
by DenisChenu
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.
Replied by DenisChenu on topic relevance not working with hidden variable from URL
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.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5070
- Thank you received: 1263
3 years 9 months ago #201822
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 relevance not working with hidden variable from URL
If there is no case to NOT add NAOK why not change the default behavior in LimeSurvey. Saves a lot of NAOKsDenisChenu wrote: I'm not thinking: I'm always adding .NAOK
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
3 years 9 months ago #201832
by DenisChenu
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.
Replied by DenisChenu on topic relevance not working with hidden variable from URL
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 …
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
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 26
- Thank you received: 0
3 years 9 months ago #201944
by suselko
Replied by suselko on topic relevance not working with hidden variable from URL
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.