Popups are there after layer style expression

268
6
07-14-2019 06:03 PM
RafiHaider
New Contributor II

Hi,

I've been trying to use arcade expression to style a line feature in Portal for ArcGIS. The expression works for the desired style. It hides a few of the features from the layer. However, if I click on the hidden feature location on the map, the pop comes up. If I use the same expression in ArcGIS Pro, the expression works as a definition query and shows/removes features accordingly. But in the portal, too many popups.

1. Style expression working

Style expression works

2. Hidden Feature

Hidden feature

3. Popups! Too many!

Too many popups

How do I limit the number of popups or make them correspond with the style expression?

Tags (1)
0 Kudos
6 Replies
XanderBakker
Esri Esteemed Contributor

Hi haiderr ,

Just wondering how you are "hiding" the feature... are you assigning a transparent symbology? You may want to filter the features instead. I guess that you are seeing 56 pop-ups since you have 56 features there, right?

If you data is related to multiple inspections of roads, you should probably use a different structure. One road feature could be related to multiple inspections stored in a related table (1:n).

0 Kudos
RafiHaider
New Contributor II

Hi Xander Bakker‌,

Thanks for your suggestions. I'm using an Arcade expression to style the layer. The expression is similar to a definition query (if-else condition). The expression filters some features but doesn't filter their popups. Even for some filtered features, which are invisible to your eyes, if you click on their location the popups show up.

In the second image, one of the road segments isn't visible. When I clicked on that segment popups are coming up.

0 Kudos
XanderBakker
Esri Esteemed Contributor

hI Rafi Haider ,

If you use an Arcade expression for the symbology, you're not really filtering the data, but classifying. Not "seeing" the feature, does not mean that it is not there (if you apply a transparent color to a set of features). If the data would be static, you can use a field calculation to create a new field with the expression and use that field for really filtering the elements that should not appear on the map.

One thing is still unclear to me... when you clicked and 56 pop-ups appeared, do you have 56 features there?

RafiHaider
New Contributor II

Thanks, Xander Bakker‌.

I thought as it worked in ArcGIS Pro, it'll work the same way in Portal. In ArcGIS Pro, the Arcade expression categorizes a date field into two, symbolizes the categories and doesn't show the rest of the features if the condition isn't met. When you click for popups, it shows popups for those features which are visible, just like definition query.

Yes, the line feature has x numbers of features with the same geometry. For that location, the features were 56. I wanted to see only one popup which met the style expression.

I think I'll go with your solution. The problem is I'll need to have a task scheduler each day to perform a field calculation.

0 Kudos
XanderBakker
Esri Esteemed Contributor

Hi Rafi Haider ,

I can imagine that having a scheduled task that does the field calculation each night is not the optimal solution (however it is a valid one). I am still wondering why you have 56 features at that location. Is this something that you could resolver using a 1:n relationship? See an example here where the maintenance history of hydrants is shown for each hydrant: https://community.esri.com/docs/DOC-12773-using-featuresetby-functions-in-arcade-to-drill-down-to-ot...

0 Kudos
RafiHaider
New Contributor II

Hi Xander Bakker‌,

This data was given to me. This data is basically an exported layer after a 1:n layer join.

As per your suggestions, we'll go with a 1:n relationship class.

Thanks for the above link. Cheers