0

I have run into an issue where a pop-up (Text), with values displayed from a custom attribute expression - is showing a different value based on what application/where I am accessing it.

Some background, we are doing a Pavement Condition Survey, and I have a county layer whose pop-up has statistics on how much mileage has been completed, skipped, and remains within that county.

In a web map, (new or classic map viewer) regardless of device, it shows the correct calculated statistic. In Field maps (Versions 21.3.1 and 22.1.0 have been tested on both iOS and Android) incorrect values are being calculated.

It is usually the largest value that has the issue, and it is not for every County Summary, seemingly only those with higher mileages. Its almost like it is timing out and not summing all of the mileage before returning the value.

See images below, where the Mileage Remaining statistic is different:

Field Maps

Web Map

Example of the Arcade Expression:

var county = $feature["NAME_LOCAS"]

var statusFset = FeatureSetByName($map,"PCS Rater Segments",['CountyName','RtrStatus', 'LengthMiles'],false)

var query = concatenate("RtrStatus= 'Not Surveyed' AND CountyName = '", county,"'")

var notSurveyed = Filter(statusFset, query)

var notSurveyedMiles = 0.0

for (var feat in notSurveyed) {
    notSurveyedMiles = notSurveyedMiles+feat.LengthMiles
}
return notSurveyedMiles

1 Answer 1

1

Adjusting the Arcade Expression section summing the miles to the below seems to have resolved the issue:

var completedMiles = Sum(completed,"LengthMiles")

Instead of interatively summing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.