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

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 2 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.

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

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5300
  • Thank you received: 291
  • Karma: 247
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 2 years 6 months ago #71692

  • Steve
  • Steve's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 494
  • 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.

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

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
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

Re: Aw: Show sub-questions based on previous question with 1.92RC and the new EM 2 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: 2 years 6 months ago by Marten.
The administrator has disabled public write access.

Re: Aw: Show sub-questions based on previous question with 1.92RC and the new EM 2 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: 2 years 6 months ago by Marten.
The administrator has disabled public write access.

Re: Aw: Show sub-questions based on previous question with 1.92RC and the new EM 2 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.

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

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
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.

Re: Aw: Show sub-questions based on previous question with 1.92RC and the new EM 2 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.

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

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5300
  • Thank you received: 291
  • Karma: 247
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.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.256 seconds
Donation Image