Select to view content in your preferred language

check values of a range of questions

409
1
11-24-2023 03:15 PM
j-bromp
Frequent Contributor

Is it possible to check a range of questions? for example if i have 20 rows in my survey each with names such as:

${d1}, ${d2}, ${d3} .... ${d19}, ${d20}.

if I have a calculation that relies on certain values in these fields do i have to call each name one by one in an if statement e.g. if(${d1} = 0 and ${d2} = 0 and ${d3} = 0 and........

or is there some way of doing: if(rows 2 - 10 = 0, true, false)

 

cheers

0 Kudos
1 Reply
abureaux
MVP Frequent Contributor

You need to reference each one individually.

EDIT: To be a little more efficient with your calculation, try if((${d1}+${d2}+...+${d20})=0,True,False)

Just be sure that all your calculations (e.g., d1) are all set to the integer field type. If you do something like ${d1}+${d2} and get 01 instead of 1, then that means your fields are being treated as text and not numbers.

0 Kudos