Survey123 Error with Calculation Bind Attached Unexpected Beginning

1176
5
02-18-2020 10:39 AM
BradGeorgic
New Contributor III

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!

0 Kudos
5 Replies
by Anonymous User
Not applicable

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.

0 Kudos
BradGeorgic
New Contributor III

Yes still having problems. Thank you and I attached is the xls.  Any help is appreciated!

0 Kudos
JamesTedrick
Esri Esteemed Contributor

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'

by Anonymous User
Not applicable

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.

BradGeorgic
New Contributor III

THANKS  With a combination of these posts I got it