- Posts: 2
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
expression manager code for all combinations in a number array
- TransportLab
- Topic Author
- Offline
- New Member
Less
More
7 years 1 month ago #148457
by TransportLab
expression manager code for all combinations in a number array was created by TransportLab
I have a number array with 9 Y-subquestions (Y1, Y2...) and 9X-subquestions (X1, X2...).
Is is possible, when using EM to indicate all possible combinations?
Purpose:
I would like to validate that the sum of all different numbers entered in the matrix equals the input in a previous question and I would like to avoid writing the 81 combinations (VAR1_Y1_X1+VAR1_Y1_X2+....)
Note: I do not yet have javascripting experience so suggestions relating to EM approaches would be best.
Is is possible, when using EM to indicate all possible combinations?
Purpose:
I would like to validate that the sum of all different numbers entered in the matrix equals the input in a previous question and I would like to avoid writing the 81 combinations (VAR1_Y1_X1+VAR1_Y1_X2+....)
Note: I do not yet have javascripting experience so suggestions relating to EM approaches would be best.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11746
- Thank you received: 2750
7 years 1 month ago #148459
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic expression manager code for all combinations in a number array
I am not aware of such a thing. I guess you will have to go for the 81 combinations, probably. Maybe someone else has an idea on how this could be made easier.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- Ben_V
- Offline
- Platinum Member
Less
More
- Posts: 1223
- Thank you received: 351
7 years 1 month ago #148462
by Ben_V
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Replied by Ben_V on topic expression manager code for all combinations in a number array
Hi,
Check out the manual (and older forum posts) about reserved 'this', 'self', and 'that' variables
manual.limesurvey.org/Expression_Manager....27that.27_variables
Check out the manual (and older forum posts) about reserved 'this', 'self', and 'that' variables
manual.limesurvey.org/Expression_Manager....27that.27_variables
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The following user(s) said Thank You: TransportLab
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5070
- Thank you received: 1263
7 years 1 month ago #148463
by jelo
To learn a bit about self that etc.
manual.limesurvey.org/Expression_Manager....27that.27_variables
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic expression manager code for all combinations in a number array
You can save yourself a bit of typing. Depending on the question type you can access row, columns complete question via self,that. E.g. {sum(self.sq_nameofsubquestion)} which than expands internally without typing every variable.TransportLab wrote: I would like to validate that the sum of all different numbers entered in the matrix equals the input in a previous question and I would like to avoid writing the 81 combinations (VAR1_Y1_X1+VAR1_Y1_X2+....)
To learn a bit about self that etc.
manual.limesurvey.org/Expression_Manager....27that.27_variables
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: tpartner, TransportLab
The topic has been locked.
- TransportLab
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
7 years 1 month ago #148493
by TransportLab
Replied by TransportLab on topic expression manager code for all combinations in a number array
Thanks a bunch. That saved me a lot of typing
The topic has been locked.