- Posts: 14
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Copy condition from one question to several others
- igeusmb
- Topic Author
- Offline
- New Member
Your LimeSurvey version: LimeSurvey Community Edition Version 6.1.4+230620
Own server or LimeSurvey hosting: Own server
Survey theme/template: fruity
==================
Hi,
I am following the to set conditions on several questions, and would like to copy a condition to several others. Contrary to what is indicated on the wiki, I can't see a button to access the Conditions section, and also no option to copy condition to several other questions. Can you tell me how I can copy a condition to another question?
Thanks in advance.
Best regards,
Jessica
Please Log in to join the conversation.
- holch
- Offline
- LimeSurvey Community Team
- Posts: 11660
- Thank you received: 2742
To copy "conditions" or "relevance equations" I would avoid the condition designer and rather work with Expression Manager/Script. The code can easily be copied to other questions / question groups / subquestions to show/hide them.
Contrary to what is indicated on the wiki,
Ideally you show us what you are referring to, for us to better understand what your issue is (link to the wiki).
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Please Log in to join the conversation.
- igeusmb
- Topic Author
- Offline
- New Member
- Posts: 14
- Thank you received: 0
Thanks for your quick reply.
I don't know why Limesurvey version was not displayed: I copied it from my website. Anyway I edited the message and the rest was already answered.
The link I am refering to is the following : [url][/url]
Copying the condition to each question individually is quite cumbersome, so I was hoping for a way to set a condition for multiple questions at once.
Thanks for your help!
Best,
Jessica
Please Log in to join the conversation.
- igeusmb
- Topic Author
- Offline
- New Member
- Posts: 14
- Thank you received: 0
Sorry I can't provide the URL, I really don't know what is happening.
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
- Posts: 12940
- Thank you received: 3979
And why don't you type it?I don't know why Limesurvey version was not displayed: I copied it from my website.
But I do not see any issue.
In version 6.2.5. you find it here
But as @holch, I hoped this "dinosaurus" had disappeard.
ExpressionScript is mightier, more flexible, faster.
Here a small comparison
[url] manual.limesurvey.org/ExpressionScript_-...ons_and_Relevance.3F [/url]
1 Pro, 7 Cons
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Please Log in to join the conversation.
- holch
- Offline
- LimeSurvey Community Team
- Posts: 11660
- Thank you received: 2742
OK, so you are using the LS6 branch. The condition designer (which you shouldn't actually use, it is quite outdated and a lot less flexible than Expressions) is a little bit more hidden, if I recall right.
I would need to search now, because I don't use the condition designer. Far too slow and less flexible than writing your own expressions / conditions / relevance equations.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Please Log in to join the conversation.
- igeusmb
- Topic Author
- Offline
- New Member
- Posts: 14
- Thank you received: 0
I am indeed using Expressions (I am talking about conditions since I paste it in the "Condition" field when editing a question).
I got interested in the Copy conditions section in the wiki because I would like to set an expression, and then paste it to dozens of other questions without having to copy/paste it to each question individually.
If that is not possible, I will find another way.
Thanks for your help.
Best regards,
Jessica
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
- Posts: 12940
- Thank you received: 3979
In this case I'd put these questions into one group and set the condition on the group.I got interested in the Copy conditions section in the wiki because I would like to set an expression, and then paste it to dozens of other questions without having to copy/paste it to each question individually.
Of cpourse not possible if the questions are spread all of the survey.
What I do?
I copy a generic question without text but the parameters that stay the same.
I only have to change the question text the answer options the type.
But these things I have to do as well when I create a new question.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Please Log in to join the conversation.
- igeusmb
- Topic Author
- Offline
- New Member
- Posts: 14
- Thank you received: 0
I tried to use the group condition but it is not really working: the condition is assessed correctly, however it keeps displaying the group questions, but hidden (instead of skipping to the next group).
So I think I will resign myself to copy/paste
Please Log in to join the conversation.
- igeusmb
- Topic Author
- Offline
- New Member
- Posts: 14
- Thank you received: 0
However, if it occurs before, the strange behavior I described earlier happens. I can only see the "Next" button, and if I try to hit it, I can't since the question is mandatory.
Please Log in to join the conversation.
- holch
- Offline
- LimeSurvey Community Team
- Posts: 11660
- Thank you received: 2742
Question by question?
Group by Group?
All in One?
If you set conditions correctly, this should work. Therefore, send a LSS file with the relevant survey structure (make a copy of your survey, delete everything that is not necessary for showing the issue, anonymize the questions and answer options if necessary, export as LSS file - not LSQ, not LSG - and upload it here).
This way we can see what you are doing wrong. Because there is something not right.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Please Log in to join the conversation.
- igeusmb
- Topic Author
- Offline
- New Member
- Posts: 14
- Thank you received: 0
I am using Question by question mode.
By "upload it here", you mean in response to your message, or did you point to an URL that did not show? Unfortunately I don't see any way of uploading a file in the editor
My condition is the following:
sum(( ! is_empty() AND != "6"), ( ! is_empty() AND != "13"), ( ! is_empty() AND != "4"), ( ! is_empty() AND != "2"), ( ! is_empty() AND != "10"), ( ! is_empty() AND != "55"), ( ! is_empty() AND != "91")) < 4
(Ok, question codes disappear for whatever reason but hopefully you get the idea)
The idea is to count mistakes (expected response to MATHS01 is 6, to MATHS02 13, etc.) and to jump to next question group as soon as we count 4 mistakes.
Please Log in to join the conversation.