Hello, I am struggling to convert values with decimal numbers to whole number in Arcade expression for pop-ups in AGOL. Code that I prepared returns values like "12.00", which includes decimal numbers, and I would like to convert them to whole numbers like "12" in pop-ups. My script below does not work unfortunately; thus, if anyone could give me an advice, that would be much appreciated.
// Get number of points that intersect with polygon
var lu = FeatureSetByName($map, "pointA", ["incident_name"])
var xs = Intersects(lu, $feature)
var count_num = Count(xs)
var whole_number_count = Floor(count_num)
return whole_number_count
Solved! Go to Solution.
https://developers.arcgis.com/arcade/function-reference/math_functions/#round
Thanks for your reply.
Text function worked but Round and Floor function did not work. Both Round and Floor function work in Arcade playground but it did not show whole number in Pop-ups in a web map for some reasons. Do you know why only text function works?
Thanks magisian,
Yes, this is it, I managed to configure the type of field for the pop-ups and zero decimal places that agree with Arcade expression.