I'm testing limesurvey if conditions coming from token fields and am unable to get it to work.
I've set up additional attribute fields where 'ATTRIBUTE_4' has the field description of 'state'. In this field, as you can imagine, the state of the individual record exists (e.g. TX, OH, NY, etc.)
When i display the tokens the 'state' field is there, and it is populated with the correct state data.
In my survey i put a simple test question of "How do you like Texas?" and an if condition that looks like this in the 'relevance equation'...
((TOKEN:ATTRIBUTE_4 == "TX"))
When i test the survey those with TX in the field do not get the question.
How do you put this? As a relevance equation or do you go through the token system? I could write it without "((" and "))", but I don't know if this is the problem.
Now how do you test this? With the survey activated? Not activated?
And most importantly: What version of Limesurvey are you using?
Help us to help you!
Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
And myabe try to fix the attribute before testing, i always add trim function when using token : a hidden space in excel is quick....
trim(TOKEN:ATTRIBUTE_4) == "TX"
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. -
Professional support
-
Plugins, theme and development
. I don't answer to private message.
All of the advice has been tried and it's still not working.
My version of LimeSurvey is: Version 2.06+ Build 151016
I originally put the if condition in by using the 'set conditions for this question' icon. When trying the advice in this thread i used the relevance equation (which is where the 'set conditions...' icon put the condition in the first place.
I'm testing it after the survey is activated.
Hmm...that should work (and does in my 2.06) whether the survey is activated or not. I assume you are using all upper-case for "TOKEN:ATTRIBUTE_4" (your last post has it in lower-case).
Cheers,
Tony Partner Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Any chance you can export a sample of your tokens? Obviously without private data of your respondents, but dummy data? A screenshot might do, just to make sure that the token table is allright.
Help us to help you!
Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.