I have the following Arcade expression. However, it does not round to the nearest whole number. It always produces a number with two decimal places. Not sure if I am doing something wrong? Thanks.
var grid = $feature.GRIDCODE*10
var roundedValue = Round(grid, 0)
roundedValue
Solved! Go to Solution.
Hi @DataOfficer ,
To avoid having to enter the list of fields and define how many decimals should be used you can use the Text function and format it the way you want. Have a look at the example below:
var x1 = PI * 100;
Console(x1);
var x2 = Round(x1, 3);
Console(x2);
var x3 = Text(x2, "#.00");
Console(x3);
var x4 = Text(x2, "#");
Console(x4);
This will write to the console:
314.1592653589793
314.159
314.16
314
Excellent thank you. I appreciate your continued advice on this forum.
I have the same problem.
What I did was I create a new field (Double) field calculate all for my (Short )field. In ArcGISPro.
In Web Map: I went to pop up and put "0 decimal Places". and resolve.
SO the field has to be DOUBLE