Filtering questions based off a single column in an Array (Text)

Plus d'informations
il y a 7 mois 4 semaines #177131 par Racheltownsend1
Below is a pic of what I am trying to do.

I am trying to figure out how to get the sub-questions in Q2d to filter based off of columns 3 (pyrosequencing) and 7 (send out) only. The way I have it now, it is filtering off of all columns that have a check mark.

So, for Q2d to show up the way I want it to, only Gastrointestinal Stromal Tumors and Glioblastoma would show up.

Any idea what code I need to enter under the filter field in order to filter just the sub-questions that have check marks in columns 3 and/or 7?

Pièces jointes :

Connexion ou Créer un compte pour participer à la conversation.

LimeSurvey Partners
Plus d'informations
il y a 7 mois 4 semaines #177132 par jelo
Attach a survey with the relevant questions as an LSS export here to this thread.
What version of LimeSurvey is used?


The questiontype looks like Array (Numbers) with Checkbox style.
The access of these variables are
Questioncode_YAXISanswercode_XAXISanserscode.NAOK

E.g. qa_SQY01_SQX01.NAOK
when qa is the questioncode
when Y-Axiscodes are SQY01, SQY02 etc.
when X-Axiscodes are SQX01, SQX02 etc.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 7 mois 4 semaines #177134 par Racheltownsend1
Thank you for your help, Jelo. I am a new user, and I am not a coder, so I have a lot to learn.


I am using Version 3.15.1+181017

The file you requested is attached.

Right now I just have the filter set to Q2, which is why it is pulling any answer that is checked. I tried entering different things, like ! is_empty(Q2_SQ001_SQ001), in the filter field, but I still couldn't get it to work right. I'm not sure what the correct way is to identify a checked box in a certain column.
Pièces jointes :

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 7 mois 4 semaines #177139 par jelo
You seem to use an arrayfilter instead of subquestion relevance.

Remove all conditions or relevance from a question and then begin to experiment with subquestionrelevance.



Instead of 1 you write relevance with ExpressionScript (still labled ExpressionManager).

E.g. !is_empty(Q2_SQ001_SQ007.NAOK) etc.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Pièces jointes :
Les utilisateur(s) suivant ont remercié: DenisChenu

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 7 mois 4 semaines #177147 par DenisChenu
I move this topic : totally unrelated to Development

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 7 mois 4 semaines - il y a 7 mois 4 semaines #177191 par Racheltownsend1
Thanks for your help, Jelo. I was finally able to figure it out after you pointed me in the right direction. Not sure if it's the best way to do it, but at least it works!

Thought I'd post pics of what I did just in case anyone else ever needs help with the same issue.

Step 1 - enter a relevance equation for Q2b (question 2b) so the question only shows up if subquestions in columns 3 or 7 are selected.
Step 2 - in the filter field, enter question code for the question I want to filter (Q2)
Step 3 - enter relevance equations for each subquestion for Q2b so only the subquestions in columns 3 or 7 show up when selected.

Step 1 image:




Step 2 image:


Step 3 image:
Pièces jointes :
Dernière édition: il y a 7 mois 4 semaines par Racheltownsend1.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 7 mois 4 semaines #177192 par jelo

Racheltownsend1 écrit: Thanks for your help, Jelo. I was finally able to figure it out after you pointed me in the right direction. Not sure if it's the best way to do it, but at least it works!


Did you try it with just step3 first? Without question relevance and arrayfilter the question should only be shown if one of the subquestions are with relevance. I didn't checked it, so LimeSurvey might not that clever and an empty question would be shown.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 7 mois 4 semaines #177193 par Racheltownsend1
Yes, I did try it with just Step 3 first, but if I do that then Question Q2d always shows up - pic below. Since I only want Q2d to show up if columns 3 or 7 are selected, I had to put a relevance equation for Q2d, as well.

Out of curiosity, I did go back and delete Q2 from the filter field to see if that changed anything. It doesn't seem to matter if the filter code is there or not, so I guess that step can be skipped.

Pièces jointes :

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 7 mois 4 semaines #177196 par jelo
I tried to reproduce the issue that a question is shown, when all subquestion are having a relevance of 0.

Looks fine under 3.15.5. for me.



Every subquestion with a relevance of 0 and complete question is hidden.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Pièces jointes :

Connexion ou Créer un compte pour participer à la conversation.

Commencez dès maintenant !

Créez simplement un compte et commencez à utiliser LimeSurvey dès aujourd'hui.

Inscrivez-vous maintenant

Inscrivez-vous à notre Newsletter!