Hi All,
I am working in a from where i have to calculate total population based on input given for each field. Am having options like example SC:120
ST: (here if may enter data or not based on the availability)
OC: 100
Others: 20
but if calculate total like ${sc}+$st}+${obc}+${others} will it auto -calculate total without entering input in ST field
Thanks in Advance
Unanswered number questions are treated as Not a Number (NaN
). The empty value will not be converted to zero. The result of a calculation including NaN
will also be NaN
. See the docs on empty values.
- You could have a default value of
0
and require the questions so that the user is forced to answer.
- You could also have a calculate for each potentially empty value and use those in your total calculation. See below:
+-----------+---------+---------+-------------------------+
| type | name | label | calculation |
+-----------+---------+---------+-------------------------+
| integer | sc | sc | number |
| integer | st | st | number |
| calculate | sc_calc | sc_calc | if(${sc}="", 0, ${sc}) |
| calculate | st_calc | st_calc | if(${st}="", 0, ${st}) |
| calculate | total | total | ${sc_calc} + ${st_calc} |
+-----------+---------+---------+-------------------------+
Does this help?
1 Like
Ok.Thank you.
I will check and give further update