cascading array filters

Más
1 mes 5 días antes #186564 por comep
I have 3 questions

question 1 - TIPE, list - with subquestions a1,a2,a3,a4,a5
Question 2 - DSESEC, multiple answers - with sq a1..a7

Question 3 - Test. Q3 is used with casscading array filters in combination with q2. Works perfectly only in combination with question 2. When I want that question 3 to be active only if TIPE < a5, it ignores me.

I have in relevance eq the following:
{ (TipE.NAOK <= "A4") &&
((dsesec_A1_naOK == "Y") or
(dsesec_A2_naOK == "Y") or
(dsesec_A3_naOK == "Y") or
(dsesec_A4_naOK == "Y") or
(dsesec_A5_naOK == "Y") or
(dsesec_A6_naOK == "Y") or
(dsesec_A7_naOK == "Y") )}

Also i have in array vector: tipe;dsesec

Still no luck,

Can you please help me?

LS Version 2.72.5+171121

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

LimeSurvey Partners
Más
1 mes 5 días antes #186568 por tpartner
Respuesta de tpartner sobre el tema cascading array filters
You cannot use a less-than operator on a string. Less than "A4" doesn't make any sense.

You will need to use:

TIPE.NAOK == "A1" OR TIPE.NAOK == "A2" OR TIPE.NAOK == "A3" OR TIPE.NAOK == "A4"

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
El siguiente usuario dijo gracias: cdorin

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 4 días antes #186574 por Joffm
Respuesta de Joffm sobre el tema cascading array filters
And why do you use alphanumeric codes if you want to compare?
Use numeric codes and everythings is fine.

Then you say "TIPE<5"

Joffm

PS.
If you want to compare alphanumeric use quotes.
Then, "A4" is less then "A5", but "A14" is less than both. (the second character "1" is less than "4")


Volunteers are not paid.
Not because they are worthless, but because they are priceless

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 4 días antes #186576 por comep
Respuesta de comep sobre el tema cascading array filters


I used conditions creator for the TIPe filter for others questions. They work perfectly.

I still can't manage to have both conditions to work.

Thank you anyway
Adjuntos:

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 4 días antes #186581 por Joffm
Respuesta de Joffm sobre el tema cascading array filters
Did you use a second scenario?

BTW: Use Expression Manager instead of condition manager.

Joffm

In such cases it's always recommended to send a small sample (*,lss) with the relevant questions.


Volunteers are not paid.
Not because they are worthless, but because they are priceless

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 4 días antes #186595 por Joffm
Respuesta de Joffm sobre el tema cascading array filters
Hi,
I hope these are only typos.

{ (TipE.NAOK <= "A4") &&
((dsesec_A1_naOK == "Y") or
(dsesec_A2_naOK == "Y") or
(dsesec_A3_naOK == "Y") or
(dsesec_A4_naOK == "Y") or
(dsesec_A5_naOK == "Y") or
(dsesec_A6_naOK == "Y") or
(dsesec_A7_naOK == "Y") )}

In the relevance equation you do not use curly brackets.

Also i have in array vector: tipe;dsesec

Do you mean "array filter"?

1. If you have ALL subquestions of dsesec in your OR-condition, it is useless. There should be always one subquestion selected, so this part is always true.

2. A single punch question like "tipe" in array filter. ?????

All you need is the relevance equation in Q3: tipe != "A5"
- If you like to display "group by group" !is_empty(tipe) AND tipe != "A5" prevents an empty array Q3 to be displayed -
and an array filter in Q3: dsesec.

That's all.








Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Adjuntos:

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 4 días antes #186597 por comep
Respuesta de comep sobre el tema cascading array filters
Thank you, it worked. Have a nice day!

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
1 mes 4 días antes #186601 por DenisChenu
Respuesta de DenisChenu sobre el tema cascading array filters

tpartner escribió: You cannot use a less-than operator on a string. Less than "A4" doesn't make any sense.

No,

I'm not OK with this : alpha compare can always be done before 3.0 and it work. In fact it work in pure PHP and pure JS with ASCII caracter
"A" < "B"
"A1" < "A2"
etc …

The only comparaison that was unsure is "1" < "A" …

See github.com/LimeSurvey/LimeSurvey/commit/...9b8a12bc55cd33b46a1e

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 .

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

¡Comenzar ahora!

Simplemente cree una cuenta y comience a usar LimeSurvey hoy mismo.

Registrarse ahora
¡Únase a nuestro boletín informativo!

Iniciar sesión