Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

use RegEx to check multiple questions in relevance equation

  • keunes
  • keunes's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 3 days ago #135090 by keunes
I have the following multiple choice questions and subquestions (in different q-groups, NOT an array), with checked answers in bold.
.
Q1: SITU1BRAN
Which brands did you
use when cleaning the kitchen
Q2: SITU2BRAN
Which brands did you
use when doing the bathroom
Q3: SITU3BRAN
Which brands did you
use in your bedroom
SQ1: SITU1BRAN_1SQ1: SITU2BRAN_1SQ1: SITU3BRAN_1
SQ2: SITU1BRAN_2SQ2: SITU2BRAN_2SQ2: SITU3BRAN_2
SQ3: SITU1BRAN_3SQ3: SITU2BRAN_3SQ3: SITU3BRAN_3
SQ4: SITU1BRAN_4SQ4: SITU2BRAN_4SQ4: SITU3BRAN_4

The codes and names for all sub-questions are equal (thus Q1_SQ1 == Q2_SQ1)

My last question (Q4) is a multiple short text question, asking why they selected the answers in the multiple choice questions.
Q4: Why did you use these brands?
All its sub-questions should have a relevance filter that checks the same sub-question of each question, so sth like:
Q4_SQ1: [tt]!is_empty(SITU{[1-4]}BRAN_1)[/tt] -> result should be positive
Q4_SQ2: [tt]!is_empty(SITU{[1-4]}BRAN_2)[/tt] -> result should be positive
Q4_SQ3: [tt]!is_empty(SITU{[1-4]}BRAN_3)[/tt] -> result should be positive
Q4_SQ4: [tt]!is_empty(SITU{[1-4]}BRAN_4)[/tt] -> result should be negative

The above relevance equations per subquestion are most likely wrong, but how can achieve this goal?
I don't want to type [tt]!is_empty(SITU1BRAN_1) or !is_empty(SITU2BRAN_1) or ... or !is_empty(SITU10BRAN_1)[/tt]

In the attachment the relevant questions from my survey.

I'm using LimeSurvey Version 2.50+ Build 160421
Hope I made my question understandable. Many thanks!
Attachments:
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose