Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Show sub-questions based on previous question with 1.92RC and the new EM

Show sub-questions based on previous question with 1.92RC and the new EM 4 years 6 months ago #71656

  • Marten
  • Marten's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 12
  • Karma: 0
Hi,

Trying to get this to work:

Q1 (Array)
A B C
1
2
3

Q2 (Array)
A B C
1
2
3
4
5

If Q1_1 == A show Q2_2
If Q1_3 == A or B show Q2_5

I.e. different number of sub-questions and not 1:1 relationship.

Did this in 1.91+ with assistance from hidden Multiple Choice question and some JavaScript, but since I have quite a lot of of these questions it would be nice to find a neater solution.

Questions can be on same or separate pages - whatever is easier.

Best regards,

Marten
The administrator has disabled public write access.

Show sub-questions based on previous question with 1.92RC and the new EM 4 years 6 months ago #71680

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5974
  • Thank you received: 366
  • Karma: 260
There is no inbuild feature for this. One solution might be to splitt up A B C into single questions and then use array filter attribute.

Have a look at the powerful Expression Manager at the 1.92RC version, it should be able to deal with it: docs.limesurvey.org/Expression+Manager+HowTos

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Aw: Show sub-questions based on previous question with 1.92RC and the new EM 4 years 6 months ago #71692

  • Steve
  • Steve's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 493
  • Thank you received: 46
  • Karma: 17
Hello,

if you want to know something about the EM TMSWhite is your man. I looked it up in the documentation, it mentions that array_filter and array_filter_exclue will be converted to sub-question-level relevance but I haven't seen anything where you can enter a sub-question relevance.
Mit freundlichen Grüßen/Best regards,

Stefan Gohlke
LimeSurvey Team
The administrator has disabled public write access.

Aw: Show sub-questions based on previous question with 1.92RC and the new EM 4 years 6 months ago #71745

  • TMSWhite
  • TMSWhite's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 758
  • Thank you received: 83
  • Karma: 37
vierundzwanzig and Marten-

EM will eventually let us do custom sub-question-level relevance.

Currently, EM automatically creates sub-question-level relevance whenever it sees array_filter or array_filter_exclude. The long-term plan is to add a relevance column to the sub-question views so that you can add any extra relevance clauses you might desire. These would then be ANDed with the array_filter(_exclude), question, and group-level relevance clauses.

The database is all set for this, so would not be a major change to add the GUI elements and EM-related elements to make this work.

For now, though, there are plenty of work-arounds if you're willing to split up your questions.

/Tom
The administrator has disabled public write access.
The following user(s) said Thank You: Marten

Aw: Show sub-questions based on previous question with 1.92RC and the new EM 4 years 6 months ago #71761

  • Marten
  • Marten's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 12
  • Karma: 0
vierundzwanzig: Yes, that's what I've seen as well. If you have an array_filter it shows up in the Logic File as
SQ-1	Q2_1	((Q1_1 != ""))	1
SQ-2	Q2_2	((Q1_2 != ""))	2
SQ-3	Q2_3	((Q1_3 != ""))	3
SQ-4	Q2_4	((Q1_4 != ""))	4
SQ-5	Q2_5	((Q1_5 != ""))	5
making me hope there would be some way to modify it.
Last Edit: 4 years 6 months ago by Marten.
The administrator has disabled public write access.

Aw: Show sub-questions based on previous question with 1.92RC and the new EM 4 years 6 months ago #71762

  • Marten
  • Marten's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 12
  • Karma: 0
TMSWhite wrote:
vierundzwanzig and Marten-

EM will eventually let us do custom sub-question-level relevance.

Currently, EM automatically creates sub-question-level relevance whenever it sees array_filter or array_filter_exclude. The long-term plan is to add a relevance column to the sub-question views so that you can add any extra relevance clauses you might desire. These would then be ANDed with the array_filter(_exclude), question, and group-level relevance clauses.

The database is all set for this, so would not be a major change to add the GUI elements and EM-related elements to make this work.

For now, though, there are plenty of work-arounds if you're willing to split up your questions.

/Tom

Thanks, this was what I was hoping for :) Looking forward to seeing this implemented soon. For this specific survey I'll just have to do a workaround.
Last Edit: 4 years 6 months ago by Marten.
The administrator has disabled public write access.

Aw: Show sub-questions based on previous question with 1.92RC and the new EM 4 years 6 months ago #71763

  • Marten
  • Marten's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 12
  • Karma: 0
TMSWhite wrote:
vierundzwanzig and Marten-

The database is all set for this, so would not be a major change to add the GUI elements and EM-related elements to make this work.

/Tom

Hi again,

is this implemented in the rendering of surveys, i.e. will if be used if I add ((Q1_1 == "B")) to a sub-question? (I know this specific example doesn't work since I just did that, but that might also be that my ((Q1_1 == "B")) is wrong syntax.

/Marten
The administrator has disabled public write access.

Aw: Show sub-questions based on previous question with 1.92RC and the new EM 4 years 6 months ago #71857

  • TMSWhite
  • TMSWhite's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 758
  • Thank you received: 83
  • Karma: 37
Marten-

yes, the array_filter and array_filter_exclude automatically generate the sub-question relevance you are seeing in Show Logic File. Those can not be edited. However, we'll be adding a relevance field for sub-questions (e.g. where you specify the sub-question codes, values, and message). Any custom sub-question relevance will be ANDed to the array_filter relevance.

So, if you wanted to show certain sub-questions using complex conditions (like if A, B or C were answered, or if more than 3 other questions were answered), you could.

That's not available in 1.92 RC2 - I need to look into this to see how early it could be available.

/Tom

-Tom
The administrator has disabled public write access.

Aw: Show sub-questions based on previous question with 1.92RC and the new EM 4 years 6 months ago #71915

  • Marten
  • Marten's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 12
  • Karma: 0
TMSWhite wrote:
Marten-

yes, the array_filter and array_filter_exclude automatically generate the sub-question relevance you are seeing in Show Logic File. Those can not be edited. However, we'll be adding a relevance field for sub-questions (e.g. where you specify the sub-question codes, values, and message). Any custom sub-question relevance will be ANDed to the array_filter relevance.

So, if you wanted to show certain sub-questions using complex <a href='docs.limesurvey.org/tiki-index.php?page=Setting%20conditions'>conditions</a> (like if A, B or C were answered, or if more than 3 other questions were answered), you could.

That's not available in 1.92 RC2 - I need to look into this to see how early it could be available.

Again, thank you for a good answer. Looking forward to seeing this implemented. Unfortunately my dev skills are as limited as available time, otherwise I would try to help out.

Best regards,

Marten
The administrator has disabled public write access.

Aw: Show sub-questions based on previous question with 1.92RC and the new EM 4 years 6 months ago #71936

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5974
  • Thank you received: 366
  • Karma: 260
You're welcome :-)

If our hints have been helpful and you enjoy limesurvey please consider a donation to the team .
We do all this in our free time and you don't have to pay a penny for this software.

Without your help we can't keep this project alive.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Aw: Show sub-questions based on previous question with 1.92RC and the new EM 4 years 6 months ago #72284

  • Marten
  • Marten's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 12
  • Karma: 0
Will do, as soon as I get the decision from management that they are happy with going into production with LimeSurvey. Currently we're only looking at different options, where LimeSurvey is the most attractive choice!
The administrator has disabled public write access.

Aw: Show sub-questions based on previous question with 1.92RC and the new EM 4 years 6 months ago #72291

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5974
  • Thank you received: 366
  • Karma: 260
Thanks for the flowers :-)

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Aw: Show sub-questions based on previous question with 1.92RC and the new EM 4 years 6 months ago #72297

  • Steve
  • Steve's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 493
  • Thank you received: 46
  • Karma: 17
Hello Marten,

I also evaluated some survey tools for our company (it iss part of my bachelor thesis) and LimeSurvey seems to be the most fitting survey tool for our company. But it might depend on your requirements though I would say you can do most things with LimeSurvey commercial survey tools can do.
Mit freundlichen Grüßen/Best regards,

Stefan Gohlke
LimeSurvey Team
The administrator has disabled public write access.

Aw: Show sub-questions based on previous question with 1.92RC and the new EM 4 years 6 months ago #72300

  • TMSWhite
  • TMSWhite's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 758
  • Thank you received: 83
  • Karma: 37
vierundzwanzig-

Since you've been doing an comparison of survey tools, I'd be interested in hearing more about gaps between LimeSurvey and best-of-breed commercial tools, such as:
(1) What, if anything, does LimeSurvey do better than most (or all) commercial tools?
(2) What key features to commercial tools have that LimeSurvey lacks - e.g. what is missing from LimeSurvey that might motivate users to use a commercial solution instead?

By the way, I wouldn't limit such thinking to commercial tools. Project RedCAP, out of Vanderbilt, is non-commercial and free (although you have to add attribution to their project), and is being widely adopted for clinical trials. If you haven't yet, you may want to look at it too.

/Tom
The administrator has disabled public write access.
The following user(s) said Thank You: DenisChenu

Show sub-questions based on previous question with 1.92RC and the new EM 4 years 6 months ago #72317

  • Steve
  • Steve's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 493
  • Thank you received: 46
  • Karma: 17
Hello,

I can't say I tested the best of breed because I had to be sure they fit our requirements. One for example was "hosting on our own server" which killed of a great number of possible candidates. And I'm not even sure if I got the best of possible tools for a comparison, but I did my best to get to know and try them out.
Sometimes you can't even say it's better or not because the approach is different and it depends on the user which approach he thinks is best suited for him.

I don't want to take this thread offtopic so let me summarize that LimeSurvey was (in my opinion) top or best compared to the other candidates in most points I looked at. There were only a few things other tools were better, for example "possible to use oracle database", one tool had a documentation which was (in my opinion) a little bit better, there are a few features some tools had or were better at and some tools had a more powerful statistic feature.
While testing some tools we were kind of disappointed and thought they were just a bad joke (and there's no way we will even pay one cent for them). For the desicion it was said that these tools have to be much better than an open source alternative and that wasn't the case (at least in my opnion).
Mit freundlichen Grüßen/Best regards,

Stefan Gohlke
LimeSurvey Team
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.281 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form