Response is Equal to 100%

More
3 years 3 months ago #110413 by lmw1
lmw1 created the topic: Response is Equal to 100%
The percentages for Race/Ethnicity can add up to more than 100%. For instance, the example below shows 3 races, each selected at 100%. I can move forward to the next page with these selections even though the total is 300%.

Race/Ethnicty is a very important variable in our data set, how can I code this page so that regardless of how many choices the user makes (it can range from 1 to 5), the total MUST equal 100%?

Also, for the alert message when the user "violates" this rule, the message should indicate that the button choices must total 100%. How can this be done?

*See attached image

Respectfully,
LMW1
Attachments:

Please Log in to join the conversation.

More
3 years 3 months ago #110415 by DenisChenu
DenisChenu replied the topic: Response is Equal to 100%
Hi,

Think it's etter to use an Array quetsion type:
- To use Array filter
- To use Whole question validation.

Think it's linked to this feature request :
bugs.limesurvey.org/view.php?id=8885

Denis

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 .
The following user(s) said Thank You: lmw1

Please Log in to join the conversation.

More
3 years 3 months ago #110422 by lmw1
lmw1 replied the topic: Response is Equal to 100%
I created an array successfully but am stumped on how to set it up to where it must equal 100%.

Right now, the user can click 100% on "all" the choices (which equals 500% and this not what we want).

Any help in the right direction would be greatly appreciated.

*See attached image

Respectfully,
LMW1
Attachments:

Please Log in to join the conversation.

More
3 years 3 months ago #110428 by DenisChenu
DenisChenu replied the topic: Response is Equal to 100%
1st : for answer code : use 100,75,50,12 and 0

And use something like this:
sum(that)<=100)
in Whole question equation : manual.limesurvey.org/Question_type_-_Ar...28em_validation_q.29

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 .

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now