- Posts: 12
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Array Numbers with Sum Validation
- chinaski01
-
Topic Author
- Offline
- New Member
-
Less
More
9 years 4 months ago #104368
by chinaski01
Array Numbers with Sum Validation was created by chinaski01
I want to do a Multiple Numeric Input question but as an array, like the Array Numbers question type, but where each column of answers sums to 100, as I can do with the Multiple Numeric Input. Is this possible?
To see what I mean, here is what it would look like
The "now" and "future" columns should sum to 100, no individual answer should be greater than 100 or less than 0.
Is this possible?
To see what I mean, here is what it would look like
The "now" and "future" columns should sum to 100, no individual answer should be greater than 100 or less than 0.
Is this possible?
Attachments:
The topic has been locked.
9 years 4 months ago #104374
by TMSWhite
If you depend upon LimeSurvey or the support team, please give generously to our 2012 fundraiser .
Replied by TMSWhite on topic Array Numbers with Sum Validation
Yes, you can do this easily.
Here is what it looks like running:
Here is the question design view:
For the help text, you enter the following:
and this expands internally to look like this:
Here is the actual question as a .lsq file
The Expression Manager documentation explains how to use the self variable in more detail.
Here is what it looks like running:
Here is the question design view:
For the help text, you enter the following:
Code:
Total Now = {sum(self.sq_now)} Total Future = {sum(self.sq_future)}
and this expands internally to look like this:
Here is the actual question as a .lsq file
The Expression Manager documentation explains how to use the self variable in more detail.
If you depend upon LimeSurvey or the support team, please give generously to our 2012 fundraiser .
- Expression Manager (EM):
Documentation
|
Sample Surveys
|
How Tos
|
Show Logic File
|
Upgrading to 1.92+ - Excel Style for Survey Structure Import/Export
The topic has been locked.
9 years 4 months ago #104392
by TMSWhite
If you depend upon LimeSurvey or the support team, please give generously to our 2012 fundraiser .
Replied by TMSWhite on topic Array Numbers with Sum Validation
I neglected the requirement that that each value be between 0 and 100.
Here is the corrected question as .lsq file:
And the associated screenshot showing that it works:
The rest is the same.
Here is the corrected question as .lsq file:
And the associated screenshot showing that it works:
The rest is the same.
If you depend upon LimeSurvey or the support team, please give generously to our 2012 fundraiser .
- Expression Manager (EM):
Documentation
|
Sample Surveys
|
How Tos
|
Show Logic File
|
Upgrading to 1.92+ - Excel Style for Survey Structure Import/Export
Attachments:
The following user(s) said Thank You: chinaski01
The topic has been locked.
- chinaski01
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 12
- Thank you received: 0
9 years 3 months ago #105681
by chinaski01
Replied by chinaski01 on topic Array Numbers with Sum Validation
Thanks for your replies to this and sorry for my late response. I didn't receive a notification that someone had responded to this thread.
I have tested out your question example and it does work very well.
Cheers.
I have tested out your question example and it does work very well.
Cheers.
The topic has been locked.
- DerBibber17
-
- Offline
- Junior Member
-
Less
More
- Posts: 22
- Thank you received: 1
4 years 2 months ago #181493
by DerBibber17
Replied by DerBibber17 on topic Array Numbers with Sum Validation
Hey there,
I need Sum Validation in an array (numbers) for LimeSurvey Version 3.13.2+180709. It should work like the "equals sum value" in "multiple numerical input"-questions.
How can I do that?
I need Sum Validation in an array (numbers) for LimeSurvey Version 3.13.2+180709. It should work like the "equals sum value" in "multiple numerical input"-questions.
How can I do that?
The topic has been locked.
- DenisChenu
-
- Offline
- LimeSurvey Community Team
-
Less
More
- Posts: 13146
- Thank you received: 2423
4 years 2 months ago #181496
by DenisChenu
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 .
I don't answer to private message.
Replied by DenisChenu on topic Array Numbers with Sum Validation
You can do any control with
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 , plugin development .
I don't answer to private message.
The topic has been locked.
4 years 2 months ago - 4 years 2 months ago #181506
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Array Numbers with Sum Validation
Hi,
see my answer to your other post about this
Joffm
see my answer to your other post about this
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 4 years 2 months ago by Joffm.
The topic has been locked.