Trying to use Survey123 XLSForm to do a calucation based on a few fields inside the form. I keep getting this error. I have all the bind:esrifieldtype set to double. the syntax for the p1distance field for the calculation is
(${EndPoint}-${StartPoint})/${Verticals}/2+${StartPoint} |
Any help would be awesome!
Hi Brad,
Are you still having this error or did you resolve it? Can you share your xlsx file so we can take a closer look at the form design and calculations?
Regards,
Phil.
Yes still having problems. Thank you and I attached is the xls. Any help is appreciated!
Hi Brad,
A couple of things
- you may want to set the bind::type column of the calculate questions to ensure they have the appropriate data type while processing inside the form
- '/' is not the proper indicator for division in XLSForms; the appropriate keyword is 'div'
Hi Brad,
The problem is that the ${Verticals} question is a text question (by default all select one are text type even if they contain numeric values). You need to set the bind::type as int or decimal (depending on your numeric values in the field) and also in your calculation in ${p1 Distance} you can cast the values as int also.
Hope this helps.
Regards,
Phil.
THANKS With a combination of these posts I got it