Pop-up not showing correct feature

754
2
Jump to solution
12-20-2021 10:49 AM
SepheFox1
New Contributor III

When I click on any feature in one particular layer, the pop-up shows information for the wrong feature. It's only happening in one layer, and it does not happen in Map Viewer, just Dashboard. It happens for all features in that layer, and it seems like it throws up a different random wrong feature each time. Oddly, the correct features do show in the detail window for the layer, which is set to only show features in the current extent.Capture.PNG

0 Kudos
1 Solution

Accepted Solutions
SepheFox1
New Contributor III

Hi Jessica, this appears to have been solved by a solution to what I though was an unrelated problem--an arcade expression I was using in this layer's pop-up was not calculating correctly in the pop-ups, but was showing correctly in the Detail window.  @jcarlson  gave me a simplified expression and it solved both issues.

The original expression was:

var lookup = ['N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SSE', 'SSE', 'S', 'SSW', 'SW', 'WSW', 'W', 'WNW', 'NW', 'NNW', 'N']
lookup[ Round(Number( Split( Text( $feature["WIND_DIRECT"] / 11.25), '.')[0]) / 2)]

 

and it was edited to:

var d = Floor(($feature["WIND_DIRECT"]+ 11.25) / 22.5)

var lookup = ['N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SSE', 'SSE', 'S', 'SSW', 'SW', 'WSW', 'W', 'WNW', 'NW', 'NNW', 'N']

return lookup[d]

 

I don't know if an arcade expression is causing your issue also, but it's worth looking in to.

View solution in original post

0 Kudos
2 Replies
JessicaSmith1986
New Contributor II

Following. I am having some of the same issues with my map. 

Jessica Smith
Humboldt County Assessor's Office
Winnemucca, NV
0 Kudos
SepheFox1
New Contributor III

Hi Jessica, this appears to have been solved by a solution to what I though was an unrelated problem--an arcade expression I was using in this layer's pop-up was not calculating correctly in the pop-ups, but was showing correctly in the Detail window.  @jcarlson  gave me a simplified expression and it solved both issues.

The original expression was:

var lookup = ['N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SSE', 'SSE', 'S', 'SSW', 'SW', 'WSW', 'W', 'WNW', 'NW', 'NNW', 'N']
lookup[ Round(Number( Split( Text( $feature["WIND_DIRECT"] / 11.25), '.')[0]) / 2)]

 

and it was edited to:

var d = Floor(($feature["WIND_DIRECT"]+ 11.25) / 22.5)

var lookup = ['N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SSE', 'SSE', 'S', 'SSW', 'SW', 'WSW', 'W', 'WNW', 'NW', 'NNW', 'N']

return lookup[d]

 

I don't know if an arcade expression is causing your issue also, but it's worth looking in to.

0 Kudos