Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Conditional branching; rapid prototyping

Conditional branching; rapid prototyping 1 year 5 months ago #111838

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 4349
  • Thank you received: 612
  • Karma: 195
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.
The following user(s) said Thank You: dglp

Conditional branching; rapid prototyping 1 year 5 months ago #111839

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 4349
  • Thank you received: 612
  • Karma: 195
Try also to understand the examples on the Expression Manager page. You can learn a lot from them and how Expression Manager works.
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.

Conditional branching; rapid prototyping 1 year 5 months ago #111840

  • dglp
  • dglp's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 18
  • Karma: 0
I am finding the information on that page too complex (and in the manual generally). The examples on relevance relate more to inserting previous answers than to the mechanics of writing a simple instruction to branch.

I am unable to evaluate the correctness of an expression, and don't see all the rules about syntax. So I'm just guessing at it again and again until something changes.

Whilst it's clear there are many powerful tools to aid development, there is a steep learning curve/high bar to understanding their proper use. There are many ways to misunderstand the information!
Last Edit: 1 year 5 months ago by dglp.
The administrator has disabled public write access.

Conditional branching; rapid prototyping 1 year 5 months ago #111841

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 4349
  • Thank you received: 612
  • Karma: 195
Definitely, Expression Manager is very complex and thus it is not learned in 5 minutes. This is advanced survey development, which will also require a little advanced learning and some time investment. There are also more pages.

However, it is impossible to explain the basics of EM in the forum. Here we can only help on specific problems and questions.
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.

Conditional branching; rapid prototyping 1 year 5 months ago #111842

  • dglp
  • dglp's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 18
  • Karma: 0
Okay.
I appreciate the limitations of the forum.

So far I have put in about 120 hours over 6 weeks trying to figure out how Lime Survey works.
Some of that development has been straightforward to figure out. Other bits not so much. I am hoping another week will get me to a point where I can activate a 30-question survey.
Last Edit: 1 year 5 months ago by dglp.
The administrator has disabled public write access.

Conditional branching; rapid prototyping 1 year 5 months ago #111844

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 4349
  • Thank you received: 612
  • Karma: 195
120h is quite a bit, you must have quite a complicated survey.

We always try to help, but it is always better to have a specific problem. I don't really understand your problem described above.
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 1 year 5 months ago #111851

  • dglp
  • dglp's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 18
  • Karma: 0
It's not a complicated survey - it's probably about as simple as they come. Probably too simple to have considered as an example in the manual. It's just a bunch of forward jumps. But it's laborious typing it out in order to test the expressions. So I've spent about 90 of those hours just monkeying with the coding.

The expression example I put up earlier was meant to describe a jump from either of two answers, in the form of ((Question1 AND Answer 1) OR (Question 3 AND Answer 1)). The survey looks like it will have 3 or 4 extraordinarily long expressions of this sort, where any of over 20 questions will jump to the same point later in the survey. I expect it to look like ((Question1 AND Answer 1) OR (Question 3 AND Answer 1) OR (Question 7 AND Answer 1) OR ... (Question 19 AND Answer 1) OR (Question 25 AND Answer 1)).

But I have given my questions the same variable names as the question groups they are in. This may be why some of the jumps fail. Group 1 is called Access, Question 1 is also called Access. When I named them I did not understand the limitation about naming variables for use by Expression Manager. I still don't know anything beyond that one fact.

So I need to go back and rename all of the questions. Or find some other way of specifying the target in EM.

So I asked if I could use another identifier like QID. That didn't work, so I will go back and rename the questions. THen see if there are other jump failures from as-yet-unknown reasons.
The administrator has disabled public write access.

Conditional branching; rapid prototyping 1 year 5 months ago #111905

  • dglp
  • dglp's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 18
  • Karma: 0
Here's a puzzler.

On a survey logic display, the order of group labels are displaced part way through the survey.

Initially, Group rows are Followed by Question rows and Answer rows.
At one point, the Group Name shifts, and shows up after the Answer rows.
The GID does not shift.

In short, only the label is displaced.

Here's a simplified diagram of the shift.




It looks as though the move of Question1 into Group 0 has caused the Group 1 label to displace onto the Group 2 row.

Is that right?
Last Edit: 1 year 5 months ago by dglp.
The administrator has disabled public write access.

Conditional branching; rapid prototyping 1 year 5 months ago #111906

  • dglp
  • dglp's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 18
  • Karma: 0
I suppose the answer is that the Reordering Tool doesn't know that a Group requires a Question. It allows me to move any question from one group to another, including the last remaining question.
The administrator has disabled public write access.

Conditional branching; rapid prototyping 1 year 5 months ago #111907

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 4349
  • Thank you received: 612
  • Karma: 195
You can't jump from one question to another in Limesurvey. You need to hide the questions that should not be shown.
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
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.185 seconds