Select to view content in your preferred language

Survey123 Form generates strange decimals in feature service - type error?

155
2
09-13-2024 09:18 AM
TomReyes
Occasional Contributor

I have a Survey123 form with several decimal entries. My users will often enter 0.2 into fields, but then when we view those entries in ArcGIS Online tables, it displays as 0.20000000298023224.

  • I have the layer visualization set to show 1 decimal place, but this is still what is returned.
  • If I open up the table in ArcGIS Pro, everything shows up as 0.2 in the table, however, if I query for values that = 0.20000000298023224, they get filtered, but still display 0.2.

Does anybody know what is going on here? I just want my fields to show the number that people enter through the form.

Tags (2)
0 Kudos
2 Replies
DougBrowning
MVP Esteemed Contributor

Its a java issue that comes up a lot that I have seen in a number of programs.  Is there a calculation running on it at all or is it straight from the user input?    Adding a round() in there could help I think.

0 Kudos
TomReyes
Occasional Contributor

Thanks, I will give that a try. I do have a checkbox that my users can check for trace cover values, and then that is supposed to calculate the cover field as 0.2 but instead shows as 0.20000000298023224. Hopefully adding a simple Round() will do the trick

0 Kudos