Select to view content in your preferred language

How to format display of calculated result in Survey123

5007
13
Jump to solution
12-06-2017 09:46 AM
JimTolbert
New Contributor III

I am using Survey123 for a Road Tour app.  Part of that is calculating the square yards of a segment.  Currently, I am successfully calculating the area with a "calculate" statement as displaying the result with a "note" statement.  I have been unable to successfully format the result to an integer.  I have tried input mask, but it is not an input and I tried "esriFieldTypeInteger" in the "bind::ersi:fieldType".   The length and width are read from previous data with pulldata().  Any suggestions?  Many thanx............ jt

0 Kudos
13 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Jim,

There are input masks that can be used to prompt data input in a pattern, but there isn't an existing function that can format a number into currency text in the form specification we use (XLSform).  We are looking at ways to support this in the future.

0 Kudos
JohnWatson_EBA
Occasional Contributor

Hey James, the input mask can be fickle. I want to give the option to put in dollar values, up to 1000, so I tried 0009.00. Only the tens column is required. I used the zero because ASCII digit permitted but not required. However, in Excel, 0009.00 gets changed to 9, no matter how I format the cell. Any thoughts on that?

0 Kudos
AdiKurniawan
New Contributor II

Hi James, 

I also face a similar problem. My calculation result shows that the number is store as a string instead of integer format when I try to access through an indicator in operation dashboard. I have tried to follow your suggestion to add a syntax int() in the Calculation column. Is there any suggestion from you?

Thank you.

Regards, 

0 Kudos
DeonLengton
Esri Contributor

Hi Adi

To force the type to Integer you need change the bind::esri::fieldType value of the question to esriFieldTypeInteger

DeonLengton_0-1634296263374.png

By default most questions in Survey123 resolve to String types.

 

0 Kudos