Select to view content in your preferred language

Number of decimal places for esriFieldTypeDouble fields

621
2
04-21-2023 11:03 AM
Labels (1)
JillianStanford
Frequent Contributor

Hi,

I've created a Data Expression that returns a feature set with several esriFieldTypeDouble fields.

When I run it in the Arcade editor, the Output looks correct, with all of the decimal places being preserved.

JillianStanford_4-1682099517267.png

 

However when I view the Data Table in the widget editor only 2 decimal places are shown.

JillianStanford_2-1682099390354.png

This is a problem because I am sorting on the Double field and the 3rd and 4th digit determine the sort order.

Is there a way to format the esriTypeDouble field so that it has more than 2 decimal places? I can probably perform the sort in Arcade but I would like to be able to use the Sort option in the widget editor.

Thanks!

Jill

 

0 Kudos
2 Replies
JenniferAcunto
Esri Regular Contributor

You need to format your decimal fields to show the number of decimal places you desire. If you are bringing that layer into the dashboard through a webmap, you would do that in the webmap. If you brought in the layer directly, you would need to do that in the visualization tab of the item details. 

JenniferAcunto_0-1682340207065.png

 

- Jen
JillianStanford
Frequent Contributor

Thanks for your reply, Jennifer.

I do not own the layer that is supplying the data, so I can't modify it's pop up.

I'm pulling in the data using the FeatureSetByPortalItem function, combining it with data from another item and then creating a new FeatureSet object from a JSON definition.

I'd be surprised that it would still be formatting the field based on the popup of the original item, since I'm defining a new field. I even tried giving it a different name. The JSON used to create the Feature Set includes the correct number of decimal places.

JillianStanford_0-1682352352252.png

Thanks again!

0 Kudos