Welcome, Guest
Username: Password: Remember me

TOPIC: Response is Equal to 100%

Response is Equal to 100% 3 weeks 6 days ago #110413

  • lmw1
  • lmw1's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 33
  • Thank you received: 1
  • Karma: 1
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:
The administrator has disabled public write access.

Response is Equal to 100% 3 weeks 6 days ago #110415

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6205
  • Thank you received: 787
  • Karma: 238
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
The administrator has disabled public write access.
The following user(s) said Thank You: lmw1

Response is Equal to 100% 3 weeks 6 days ago #110422

  • lmw1
  • lmw1's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 33
  • Thank you received: 1
  • Karma: 1
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:
The administrator has disabled public write access.

Response is Equal to 100% 3 weeks 6 days ago #110428

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6205
  • Thank you received: 787
  • Karma: 238
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
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.113 seconds
Donation Image