not equal in group relevance equation

Plus d'informations
il y a 3 semaines 6 jours - il y a 3 semaines 6 jours #176903 par KompetenzZ
KompetenzZ a créé le sujet : not equal in group relevance equation
Hi community,

I tried to set a relevance equation for a question group, the question group should only be displayed when:
! is_empty(Q1.NAOK == 9) OR ! is_empty(Q1.NAOK == 3) AND (Q2 != "waidhofen an der ybbs" OR Q2 != "allhartsberg")

Can it be that the "!=" in the equation makes troubles? Q1 is a radio (list) question and Q2 is a short free text question. When I check Q1_3 and write "waidhofen an der ybbs" or "allhartsberg", the question group that should be hidden is still displayed.

When I write instead of unequal ("!="), the equal sign ("==") it works. But I would need the unequal sign.
I've been tinkering with it for a long time, but I just cannot find the mistake.

A sample survey (.lss) with this is attached.

LS Version: 3.14


Fichier attaché :

Nom du fichier : limesurvey...4415.lss
Taille du ficher :20 ko

Cheers kompetenzz
Pièces jointes :
Dernière édition: il y a 3 semaines 6 jours par KompetenzZ.

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

Plus d'informations
il y a 3 semaines 6 jours #176907 par tpartner
tpartner a répondu au sujet : not equal in group relevance equation
There us no reason to use is_empty() when trying to determine the value of a list-radio question. It should be Q1.NAOK == 'x'.

Shouldn't that be an AND between the 'does not equal' statements?

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

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

Plus d'informations
il y a 3 semaines 5 jours - il y a 3 semaines 5 jours #176925 par Joffm
Joffm a répondu au sujet : not equal in group relevance equation
Hi,
1. as Tony said
"Q1==9" gives a result of true or false (1 or 0). So it is never empty.


2. (Q2 != "waidhofen an der ybbs" OR Q2 != "allhartsberg")
Tony already mentioned it.
This way you will get everything, even "allhartsberg"; it is unequal to "waidhausen..."
Just to remind:
NOT ( A OR B ) == ( NOT A ) AND ( NOT B )
NOT ( A AND B ) == ( NOT A ) OR ( NOT B )

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Dernière édition: il y a 3 semaines 5 jours par Joffm.

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

Plus d'informations
il y a 3 semaines 5 jours #176928 par KompetenzZ
KompetenzZ a répondu au sujet : not equal in group relevance equation
As far as I understand it, compared to an equation with EQUAL (as mentioned in the first post) the NOT EQUAL makes it neccessary to change the logical operator between the != from OR to AND.
Yes the is_empty was also misplaced.
This is probably easy for most folks here, but for myself this would not have come to my mind. Thank you very much.
Just for information, this is the adapted equation:
Q1.NAOK == 9 OR Q1.NAOK == 3 AND (Q2 != "waidhofen an der ybbs" AND Q2 != "allhartsberg")

Cheers kompetenzz

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

Plus d'informations
il y a 3 semaines 5 jours #176930 par DenisChenu
DenisChenu a répondu au sujet : not equal in group relevance equation
Without brace it's unclear :
You want
(Q1.NAOK == 9 OR Q1.NAOK == 3) AND Q2.NAOK != "waidhofen an der ybbs" AND Q2.NAOK != "allhartsberg"
or
Q1.NAOK == 9 OR (Q1.NAOK == 3 AND Q2.NAOK != "waidhofen an der ybbs" AND Q2.NAOK != "allhartsberg")
or really
Q1.NAOK == 9 OR (Q1.NAOK == 3 AND Q2.NAOK != "waidhofen an der ybbs" AND Q2.NAOK != "allhartsberg")

And with the current script : there are a lack of trigger action when user select an option : sample : gitlab.com/SondagesPro/QuestionSettingsT...-autocomplete.js#L29

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
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 3 semaines 5 jours #176935 par KompetenzZ
KompetenzZ a répondu au sujet : not equal in group relevance equation
I cannot find any difference between your second and third equation but yes these are those equations that I need, thank you for sharing you knowledge.

Regarding your last sentence: Is it that you mean that the script of the autocomplete question I asked www.limesurvey.org/forum/design-issues/1...uestion-on-same-page is not possible to implement?

Cheers kompetenzz

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

Plus d'informations
il y a 3 semaines 5 jours #176941 par DenisChenu
DenisChenu a répondu au sujet : not equal in group relevance equation
The script didn't trigger action when user select a value : you must add it manually.

In 3.X : autocomplete are devbridgeAutocomplete

Then maybe something like this
			$('#question'+qID+' input[type="text"]').autocomplete({
				source: province,
				onSelect: function (suggestion) {
					$('#question'+qID+' input[type="text"]').val(suggestion.data).trigger("keyup");
				}
			});

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
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 3 semaines 5 jours #176949 par KompetenzZ
KompetenzZ a répondu au sujet : not equal in group relevance equation
Well I don't have experience with gitlab.com, I try to ask as few question as I can:

1. Do I have to add the limesurvey-autocomplete.js from gitlab.com/SondagesPro/QuestionSettingsT...-autocomplete.js#L29 at the end of my autocomplete question?

2. Do I have to add the limesurvey-autocomplete.css from gitlab.com/SondagesPro/QuestionSettingsT...vey-autocomplete.css to the end of custom.css in my theme?

3. Where do I have to add the path to the csv lists where the autocomplete entries are stored? I don't know, I tried to find something like:
var url = surveyRoot+"upload/themes/survey/extends_bootswatch/autocomplete_list.csv";

4. Where do I have to add the code for the trigger action of your previous post?


If it's less complicated instead of answering these questions, rather adapt the test survey (.lss).

Fichier attaché :

Nom du fichier : limesurvey...1-15.lss
Taille du ficher :20 ko

Fichier attaché :

Nom du fichier : extends1_b...1-15.zip
Taille du ficher :287 ko

Cheers kompetenzz
Pièces jointes :

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

Plus d'informations
il y a 3 semaines 5 jours #176966 par DenisChenu
DenisChenu a répondu au sujet : not equal in group relevance equation
The pluugin is another way to do …

Where i need to trigger the event when user select something …

Then maube some code can inspire see www.limesurvey.org/fr/forum/design-issue...ance-equation#176941

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
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 3 semaines 4 jours #177010 par KompetenzZ
KompetenzZ a répondu au sujet : not equal in group relevance equation
Sorry, I don't have the experience to do that.

Cheers kompetenzz

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!