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
2. Hidden Feature
3. Popups! Too many!
How do I limit the number of popups or make them correspond with the style expression?
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).
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.
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?
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.
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...
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