Welcome to the LimeSurvey Community Forum

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

Multiple numerical input must add up to the value respondent entered in prev q?

  • PaulMRFGR
  • PaulMRFGR's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 day 15 hours ago #268942 by PaulMRFGR
Please help us help you and fill where relevant:
Your LimeSurvey version: Version 3.28.77+231213
Own server or LimeSurvey hosting: Own server
Survey theme/template: Own theme
==================
What code should I put in the question validation text of a multiple numerical question to ensure the value adds up to the number a respondent entered in q1a

Currently trying sum(self.NAOK)=={q1a}

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 day 14 hours ago #268943 by Joffm
Hi,
this is wrong syntax.
You see that the question validation equation automatically surrounds with curly brackets
 

You create something like {sum(self.NAOK)=={q1a}}
So this equation should be
sum(self.NAOK)==q1a

BTW: Instead of the question validation equation you can use the setting
 
Just enter q1a

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu, holch

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose