not equal in group relevance equation

Mehr
1 Jahr 1 Woche her - 1 Jahr 1 Woche her #176903 von KompetenzZ
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


Dateianhang:

Dateiname: limesurvey...4415.lss
Dateigröße:20 KB

Cheers kompetenzz
Anhänge:
Letzte Änderung: 1 Jahr 1 Woche her von KompetenzZ.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

LimeSurvey Partners
Mehr
1 Jahr 1 Woche her #176907 von tpartner
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.
Official LimeSurvey Partner - partnersurveys.com

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
1 Jahr 6 Tage her - 1 Jahr 6 Tage her #176925 von Joffm
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
Letzte Änderung: 1 Jahr 6 Tage her von Joffm.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
1 Jahr 6 Tage her #176928 von KompetenzZ
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

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
1 Jahr 6 Tage her #176930 von DenisChenu
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 , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
1 Jahr 6 Tage her #176935 von KompetenzZ
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

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
1 Jahr 6 Tage her #176941 von DenisChenu
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 , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
1 Jahr 6 Tage her #176949 von KompetenzZ
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).

Dateianhang:

Dateiname: limesurvey...1-15.lss
Dateigröße:20 KB

Dateianhang:

Dateiname: extends1_b...1-15.zip
Dateigröße:287 KB

Cheers kompetenzz
Anhänge:

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
1 Jahr 6 Tage her #176966 von DenisChenu
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 , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
1 Jahr 5 Tage her #177010 von KompetenzZ
Sorry, I don't have the experience to do that.

Cheers kompetenzz

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten

Abonnieren Sie unseren Newsletter

Abonnieren Sie unseren Newsletter für alle Neuigkeiten rund um LimeSurvey
captcha