Integers Displaying with Decimal Places Bug

1914
3
Jump to solution
03-23-2023 10:50 AM
PhilipWeeks
New Contributor III

I have fields which are definitely integers.  I have to use WebApp Builder because I need the notification list widget which to my knowledge is not on the product to be ported to Experience Builder, so the map being used is technically the map viewer classic version.  When I add these fields to pop-ups in Map Viewer Classic, fields which are definitely integers, they display with 6 decimal places.  When I search the method that comes up to fix this is to go into Configure Attributes and change the Format decimal places to 0 decimal places, which AGOL does not provide me the option to do.. because they're integers!!

They seem to display fine in the new Map Viewer but since the WebApp Builder uses the pop-up configuration from Map Viewer Classic I get these decimals displaying on integers.  Not even all integers, just some so I'm hopeful there is some way to fix this, but I haven't found it yet.  The only workaround I've come up with is to use arcade to format these fields, these fields which are integers, to round to the nearest integer.  Which happens to be the same value they are, since they're integers.  This is a parcel data set and there's over 100 fields in the full version.  I don't want to write custom arcade expressions to round every integer into an integer when they are already integers.

Anyone have any ideas on where else to investigate why these integers are displaying with 6 decimal places  (all zeroes, because they're integers) of accuracy?

Tags (3)
1 Solution

Accepted Solutions
PhilipWeeks
New Contributor III

I figured out a better work around then creating a bunch of Arcade Expressions to round integers to the nearest integer.  Seems like AGOL does honor the significant figures setting, it just won't expose them on integers.  I found a double value, cracked open the JSON using AGOL-Assistant to see how it's coded, then used AGOL-Assistant to hard code that key/value pair into the fieldname format part of the map JSON I was trying to fix.

{
"fieldName": "XMP_AMT2",
"format": {
"digitSeparator": true,
"places": 0
}

View solution in original post

0 Kudos
3 Replies
cedwards8511
New Contributor III

Agreed, integers shouldn't have that issue.

Did you check the field's formatting in Visualization to see if the significant digits option can be changed?  

CareyEdwards_0-1679611005805.png

 

0 Kudos
PhilipWeeks
New Contributor III

Hadn't checked there but it has the same problem as anywhere else; it doesn't have a significant digits drop down because it's an integer.  Thanks though.

PhilipWeeks_0-1679612393095.png

PhilipWeeks_2-1679612599528.png

Part of me wonders if there's a way of tricking AGOL into thinking the integers actually are floats or a way of forcing the significant figures drop down to appear on an integer, then I could use it to round those integers to integers.

0 Kudos
PhilipWeeks
New Contributor III

I figured out a better work around then creating a bunch of Arcade Expressions to round integers to the nearest integer.  Seems like AGOL does honor the significant figures setting, it just won't expose them on integers.  I found a double value, cracked open the JSON using AGOL-Assistant to see how it's coded, then used AGOL-Assistant to hard code that key/value pair into the fieldname format part of the map JSON I was trying to fix.

{
"fieldName": "XMP_AMT2",
"format": {
"digitSeparator": true,
"places": 0
}

0 Kudos