Question Equation assing value

Mehr
3 Monate 3 Wochen her #169403 von josegovia
josegovia erstellte das Thema Question Equation assing value
Hello

Do you know why this equation type question does not work? The equation assigns a value to another question depending on the value of a previous multiple response question.

I attach a file with the example.

Thank you.
Anhang:

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
3 Monate 3 Wochen her - 3 Monate 3 Wochen her #169404 von DenisChenu
DenisChenu antwortete auf das Thema: Question Equation assing value
1st issue : count(P1_1, P1_2, P1_3) = 1 : only one = here
2nd issue : you assign P2 at first line, and after at 2nd line and after at third .

You need one line assignation.

Something like (not tested)
{P2=(join(
if(count(P1_1, P1_2, P1_3) == 1 AND P1_1 == 'Y', '1', ''),
if(count(P1_1, P1_2, P1_3) == 1 AND P1_2 == 'Y', '2', ''),
if(count(P1_1, P1_2, P1_3) == 1 AND P1_3 == 'Y', '3', ''),
""))}

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 .
Letzte Änderung: 3 Monate 3 Wochen her von DenisChenu.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
3 Monate 3 Wochen her #169410 von josegovia
josegovia antwortete auf das Thema: Question Equation assing value
It does not work, the same thing happens, it does not assign the value to question P2.

I attached the file with the code you told me.

Thank you
Anhang:

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
3 Monate 3 Wochen her #169417 von Joffm
Joffm antwortete auf das Thema: Question Equation assing value
Hi,
this equation is suficient; join is not really necessary, because P2 is single punch.

{P2=if(count(P1_1, P1_2, P1_3) == 1 AND P1_1 == 'Y', 1, if(count(P1_1, P1_2, P1_3) == 1 AND P1_2 == 'Y', 2, if(count(P1_1, P1_2, P1_3) == 1 AND P1_3 == 'Y', 3,P2)))}
If you don't set the P2 here you will empty P2 in case you have more than one anwer in P1.

See example.


Dateianhang:

Dateiname: limesurvey...7278.lss
Dateigröße:18 KB


Regards
Joffm


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

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

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