- Posts: 6
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
I actually have the same question because I’m trying to set up a similar survey where participants enter percentages for different food types across disposal channels. I want each row to sum to exactly 100% as well, but I’m running into the same problem with the validation equation. Even when I use sum(Q5_SQ1.NAOK) == 100, I keep getting errors like “undefined variable,” and it doesn’t seem to recognize the array of subquestions properly. It’s frustrating because I don’t have programming experience, so I’m trying to rely on the built-in validation options and example code from the manuals.Please help us help you and fill where relevant:
Your LimeSurvey version: 6.5.3+240415
Own server or LimeSurvey hosting: hosted by my university
Survey theme/template:
==================
I want to create a survey questions where participants enter which type of food they dispose of through different channels. For this I used an array (numbers) with each of the food types in the rows and the different disposal routes in the columns. Participants shall then enter the percentage of each food type they dispose of through the respective disposal route as a numerical value.
So far so good. Now i want to add the condition that fo reach row/food type all the values must add up to 100, because you can only dispose of 100% of food waste but not for example 120%. culver menu food waste but not for example 120%. And I can't for the life of me figure out how to do it. I don't have any programming/coding skills so I read through the manuals. I tried this code in the question validation equation field: sum(Q5_SQ1.NAOK) == 100 and it does not work at all (I only tried it for the first subquestion as a test). I also always get the "undefined variable" notification.
How do I get this to work?
Please Log in to join the conversation.
This is not surprising; Q5_SQ1 is not a valid QCode for an array(numbers).Even when I use sum(Q5_SQ1.NAOK) == 100, I keep getting errors like “undefined variable,” and it doesn’t seem to recognize the array of subquestions properly
Please Log in to join the conversation.