- Posts: 33
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Quota for hidden question based on an short text answer
- almashah
- Topic Author
- Offline
- Junior Member
Less
More
3 years 8 months ago #204233
by almashah
Replied by almashah on topic Quota for hidden question based on an short text answer
Thank you,
It is capitalized and assigned positions but I do not know why the "if statement" ({if(position < 10,"West",if(position < 22,"East",if(position < 35,"ABC","DEF")))} is always giving DEF
It is capitalized and assigned positions but I do not know why the "if statement" ({if(position < 10,"West",if(position < 22,"East",if(position < 35,"ABC","DEF")))} is always giving DEF
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11660
- Thank you received: 2742
3 years 8 months ago #204234
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 Quota for hidden question based on an short text answer
Without seeing your code it is difficult to understand why.
At the moment seems like the conditions are never met, thus DEF is the only result. So you need to check your equation, e.g. if there is any error highlighted.
Add a LSS file with only the relevant questions to this post, then we can have a look and see what you have done and where the problem is.
At the moment seems like the conditions are never met, thus DEF is the only result. So you need to check your equation, e.g. if there is any error highlighted.
Add a LSS file with only the relevant questions to this post, then we can have a look and see what you have done and where the problem is.
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.
- almashah
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 33
- Thank you received: 0
3 years 8 months ago #204239
by almashah
Replied by almashah on topic Quota for hidden question based on an short text answer
Please find a copy of the questions attached.
Best regards
Best regards
Attachments:
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11660
- Thank you received: 2742
3 years 8 months ago #204240
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 Quota for hidden question based on an short text answer
I have asked for a LSS file. Please do not provide LSQ or LSG files. Why?
1. They are language sensitive. They can only be imported into a survey with the same language
2. Problems can arise from general survey configurations
3. If we always have to create a new survey and groups to import LSQ files to help in the forum, this will increase the time spend on doing so, which could be better invested in helping others.
So, please create a copy of your survey, exclude all parts that are not relevant for the problem and then export it as LSS.
1. They are language sensitive. They can only be imported into a survey with the same language
2. Problems can arise from general survey configurations
3. If we always have to create a new survey and groups to import LSQ files to help in the forum, this will increase the time spend on doing so, which could be better invested in helping others.
So, please create a copy of your survey, exclude all parts that are not relevant for the problem and then export it as LSS.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The following user(s) said Thank You: almashah
The topic has been locked.
- almashah
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 33
- Thank you received: 0
3 years 8 months ago #204241
by almashah
Replied by almashah on topic Quota for hidden question based on an short text answer
Thank you, please find it attached. Much appreicated
Attachments:
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12941
- Thank you received: 3979
3 years 8 months ago #204242
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Quota for hidden question based on an short text answer
Hi,
1. You use "Assign.value". You shouldn't use "Assign" as question code. Use a different Code and it will be fine
And something else:
a. Why is your first question multiple? I can agree AND not agree.
b. If you had used numeric codes in SE01 "1,2,3,4,5,6" your relevance equation of Q1 would be shorter (SE01.NAOK gt 1)
c. Your regexp in Q1 seem to have a trailing blank. Please revise. Might be because of export and import.
d. Did you use the condition builder? We do not use this anymore. Expression Manager is more flexible and powerful.
Joffm
1. You use "Assign.value". You shouldn't use "Assign" as question code. Use a different Code and it will be fine
And something else:
a. Why is your first question multiple? I can agree AND not agree.
b. If you had used numeric codes in SE01 "1,2,3,4,5,6" your relevance equation of Q1 would be shorter (SE01.NAOK gt 1)
c. Your regexp in Q1 seem to have a trailing blank. Please revise. Might be because of export and import.
d. Did you use the condition builder? We do not use this anymore. Expression Manager is more flexible and powerful.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: almashah
The topic has been locked.
- almashah
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 33
- Thank you received: 0
3 years 8 months ago #204275
by almashah
Replied by almashah on topic Quota for hidden question based on an short text answer
Thank you Joffm,
I changed the "Assign" code to different ones I tried "Q5" and then "zer" but the problem still there.
I changed the "Assign" code to different ones I tried "Q5" and then "zer" but the problem still there.
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12941
- Thank you received: 3979
3 years 8 months ago #204281
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Quota for hidden question based on an short text answer
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: almashah
The topic has been locked.
- almashah
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 33
- Thank you received: 0
3 years 8 months ago #204303
by almashah
Replied by almashah on topic Quota for hidden question based on an short text answer
Thank you Joffm for your continuous and detailed help. It works perfectly now.
The topic has been locked.
- almashah
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 33
- Thank you received: 0
3 years 8 months ago #204304
by almashah
Replied by almashah on topic Quota for hidden question based on an short text answer
Are having these issues would cause problems later on when respondents take the survey?
Best regards
Best regards
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12941
- Thank you received: 3979
3 years 8 months ago - 3 years 8 months ago #204309
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Quota for hidden question based on an short text answer
Which issues?
Your problem was that there was not only the function in the question text but some more HTML.
Instead of
{strpos("..",Q1)}
there was
{strpos("..",Q1)}
<p> </p>
Therefore the result of the equation was not e.g.
"47"
but
"47 " (with a blank at the end).
So your IF-statement couldn't work correctly.
Joffm
Your problem was that there was not only the function in the question text but some more HTML.
Instead of
{strpos("..",Q1)}
there was
{strpos("..",Q1)}
<p> </p>
Therefore the result of the equation was not e.g.
"47"
but
"47 " (with a blank at the end).
So your IF-statement couldn't work correctly.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 8 months ago by Joffm.
The following user(s) said Thank You: almashah
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
3 years 8 months ago #204313
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 Quota for hidden question based on an short text answer
To be safe, you can use the trim() function to clean up the value -
manual.limesurvey.org/ExpressionScript_-...#Access_to_functions
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: almashah
The topic has been locked.