Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Control de Cuotas en variable de Ecuación

More
5 years 10 months ago #189916 by Fran1991
Hello,

Can you make a fee for an equation variable?

I have written the following in my variable for the age range {if (P2.NAOK> = 18 and P2.NAOK <= 24.2, if (P2.NAOK> = 25 and P2.NAOK <= 34.3, if (P2.NAOK> = 35 and P2.NAOK <= 44.4, if (P2.NAOK> = 45 and P2.NAOK <= 64,5,6))))}}

I want to know what is written in the section of

"Establish the value equation"
if I want it to end if the code is 1 that is 18 to 24 years old.

Thank you very much to all

The topic has been locked.
More
5 years 10 months ago #189922 by DenisChenu
Hi,

If you put an equation in text of an equation question the result of this equation is set inside database and usable in survey (after).
But if you need
- to show something different
- same value for all language

you can use the equation settings.

Here : i think (but unsure) : you need 2 question : one hidden single choice (Q01 for the sample) and an equation

And use :
Code:
{Q01 = if (P2.NAOK> = 18 and P2.NAOK <= 24.2,"A1",
    if (P2.NAOK> = 25 and P2.NAOK <= 34.3,"A2",
        if (P2.NAOK> = 35 and P2.NAOK <= 44.4,"A3",
            if (P2.NAOK> = 45 and P2.NAOK <= 64,5,6),"A4"
        )
    )
)}
in the equation question text.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
5 years 10 months ago #189967 by Fran1991
Hello,

I created a unique option variable so that the result of the equation question was reflected, however when I believe the quota this does not recognize the result of the variable.

Any other option? or do something wrong? :)
The topic has been locked.
More
5 years 10 months ago #189968 by tpartner
You cannot use equation questions in quotas, that's why Denis suggested loading a hidden (via CSS) list-radio question.

Please refer to the manual - www.limesurvey.org/manual/Survey_quotas

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
5 years 10 months ago #189987 by DenisChenu

tpartner wrote: You cannot use equation questions in quotas, that's why Denis suggested loading a hidden (via CSS) list-radio question.

Can be hidden by attribute in current version :)

I need to create a sample survey using this system
bugs.limesurvey.org/view.php?id=15412 ;)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The following user(s) said Thank You: tpartner
The topic has been locked.
More
5 years 10 months ago #189992 by tpartner
@DenisChenu +1

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
5 years 10 months ago #190006 by DenisChenu

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose