Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:
  • Page:
  • 1
  • 2

TOPIC: Conditional branching; rapid prototyping

Conditional branching; rapid prototyping 2 years 4 weeks ago #111185

  • dglp
  • dglp's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 18
  • Karma: 0
Hi all,

Just trying to get my head round some aspects of survey design.
I have two questions - one about conditional branching, and the other about ways of rapid prototyping.

My branching question is based on having a series of questions whose response goes mainly to two separate follow-on pages.

I've got a list of 18 topics that have two or more options - where two of the options in every question go to either a description form or a subscription form.

I reckon the efficient thing is to use conditional logic to skip intervening questions, but am having a Dickens of a time getting it to work!
My impression is that the Expression Manager only allows the ANDing of separate questions - which doesn't suit!
So I am looking for tips as to the best approach.


My second question is about how to create test versions without having to go through the GUI. I'd be really happy if I could rough out a survey in spreadsheet format then upload it.

I have half a mind to take an LSS file and use copy & paste of chunks to build additional sections.
I haven't tried it yet, and am just wondering if there are fundamental obstacles to doing prototyping that way. And if so, are there other techniques that do work? :woohoo:
Last Edit: 2 years 4 weeks ago by dglp. Reason: typo
The administrator has disabled public write access.

Conditional branching; rapid prototyping 2 years 4 weeks ago #111189

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6207
  • Thank you received: 1376
  • Karma: 538
My impression is that the Expression Manager only allows the ANDing of separate questions
Why do you say that? You can definitely use OR statements in relevance equations.

My second question is about how to create test versions without having to go through the GUI.
Have a look at "Excel Survey Structure" (not sure how well that has been maintained) - manual.limesurvey.org/Excel_Survey_Structure


.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 2 years 4 weeks ago by tpartner.
The administrator has disabled public write access.
The following user(s) said Thank You: dglp

Conditional branching; rapid prototyping 2 years 4 weeks ago #111190

  • dglp
  • dglp's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 18
  • Karma: 0
Thank you Tony,

I will be able answer your question about conditional branching in a bit more detail later when I've got more time.
For now, I'm answering the question with a question, as shown here.




While the description of complex conditions in the manual seems to say that it's possible to OR certain kinds of questions, it also says that certain other conditions can only be ANDed.

So I either need to find out how to set up questions in a way that allows me to OR each subquestion in a multiple choice question with EVERY other similar subquestion in every other question.

As a Boolean kind of phrase, I'm looking for D = (T1.Q1.SQ1 OR T1.Q2.SQ1 OR T1.Q3.SQ1 OR ... T1.Q99.SQ1) where Tn is a Group, Qn is a question and SQn is a particular subquestion that repeats from one question to the next within the group. D is a longtext form.

So I want to skip immediately to D if I select Option 1 in ANY of the n Questions in Group 1.
At present, sometimes it just carries on to the next Question.
The administrator has disabled public write access.

Conditional branching; rapid prototyping 2 years 4 weeks ago #111191

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6207
  • Thank you received: 1376
  • Karma: 538
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.
The following user(s) said Thank You: dglp

Conditional branching; rapid prototyping 2 years 4 weeks ago #111199

  • dglp
  • dglp's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 18
  • Karma: 0
Eek!
I thought Expression Manager and conditions Designer were two names for the same thing.
Have been reading about one and trying to work with the other.

Time to do a bunch more reading then...
The administrator has disabled public write access.

Conditional branching; rapid prototyping 2 years 4 weeks ago #111200

  • c_schmitz
  • c_schmitz's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 1008
  • Thank you received: 135
  • Karma: 97
To make it an 'OR' use a scenario.
Best regards

Carsten Schmitz
LimeSurvey project leader
The administrator has disabled public write access.
The following user(s) said Thank You: dglp

Conditional branching; rapid prototyping 2 years 3 weeks ago #111239

  • dglp
  • dglp's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 18
  • Karma: 0
I need an emoticon for 'exploding brain'. :pinch:

Not used to working with variables, nor with the EM syntax.

But, starting with syntax, is there a key somewhere that explains &&, == and so on?
So I can figure out the meaning of statements like cohabs>1 && p1_rel != "".
The administrator has disabled public write access.

Conditional branching; rapid prototyping 2 years 3 weeks ago #111256

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6207
  • Thank you received: 1376
  • Karma: 538
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.
The following user(s) said Thank You: dglp

Conditional branching; rapid prototyping 2 years 3 weeks ago #111278

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9298
  • Thank you received: 1330
  • Karma: 386
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.
The following user(s) said Thank You: dglp

Conditional branching; rapid prototyping 2 years 3 weeks ago #111298

  • dglp
  • dglp's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 18
  • Karma: 0
Very good!

With all there is to absorb re Expression Manager, I reckon I'll be lucky to come back with any followup questions in less than a month...
The administrator has disabled public write access.

Conditional branching; rapid prototyping 2 years 3 weeks ago #111311

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9298
  • Thank you received: 1330
  • Karma: 386
A quick tip for Expression Manager:
- Use the condition editor (with the AND )
- Save , copy the expression on the question quick view
- Remove all condition
- Paste the condition with the AND
- Replace AND by OR

Denis
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.
The following user(s) said Thank You: dglp

Conditional branching; rapid prototyping 2 years 21 hours ago #111834

  • dglp
  • dglp's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 18
  • Karma: 0
testing... preview mode not working?

Aside from that, I'm trying to figure out the relevance expression syntax.

I can't figure it out by reading the manual.

I'd like to know if I can use things like QID and GID in the expression.

In an example like ((TopicList == "G01") AND (QID 619 == "A01")) I cannot figure out whether there's a valid way of using QID 619.

Have tried various ways of bracketing, quoting, and so forth with no success.
Last Edit: 2 years 21 hours ago by dglp.
The administrator has disabled public write access.

Conditional branching; rapid prototyping 2 years 18 hours ago #111835

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5095
  • Thank you received: 756
  • Karma: 227
From what I know, you should use the question code or group code instead the SGQA code. However, reading here manual.limesurvey.org/Expression_Manager#Key_Definitions it seems like the SGQA could still be used.

But I am not quite sure what you are trying, because it looks like you check if a question code equal to it's QID and the same for the group. This doesn't make much sense to me...

Read through manual.limesurvey.org/Expression_Manager which helps quite good to understand how the EM works. If you would like to reference to the Question ID instead of the question code (that you can define yourself), then you must follow the rules of the SGQA code. You can't just reference the QID directly.
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
The administrator has disabled public write access.
The following user(s) said Thank You: dglp

Conditional branching; rapid prototyping 2 years 17 hours ago #111836

  • dglp
  • dglp's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 18
  • Karma: 0
Thank you holch.

I have having a lot of difficulty understanding the explanations of Expression Manager in the manual - so I am asking here.

Your link to SGQA code gives a 404 error.

It sounds like you answer my question in the final line: cannot reference QID directly.

In that case, I'm not able to figure out what else - if anything - can be referenced directly.

I see that some Names[ID] can be referenced, but is that the only thing?
Last Edit: 2 years 17 hours ago by dglp.
The administrator has disabled public write access.

Conditional branching; rapid prototyping 2 years 17 hours ago #111837

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5095
  • Thank you received: 756
  • Karma: 227
On the Expression Manager manual page there is an example of the SGQA code. It is quite simple.
S = Survey (Refers to the survey id)
G = Group (Refers to the group id)
Q = Question (refers to the question id)
A = Answer (refers to the answer id)

Here the manual page for the SGQA identifier: manual.limesurvey.org/SGQA_identifier

Often it helps to search with "limesurvey xxxxx" in Google, which seems to work better than the actual search in the manual.
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.427 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form