Returning related features in a popup only where they exist

270
0
08-18-2022 09:06 AM
Labels (1)
RandallBrown
New Contributor III

I have a feature layer with a one-to-many relationship with 20 other feature layers.  I can check the "Show related data" checkbox in my WebMap popup configuration for this layer to see all of the related features.  My issue is that in many cases there are only related records in 2 or 3 of the other feature layers, but using the "Show related data" checkbox returns an item in my popup for all 20 related layers regardless of whether or not that layer has any related features.

Through a combination of Attribute Expressions in Arcade I am able to configure a popup that will only return feature attribute info from the layers with related features.  It requires creating 40 separate attribute expressions and it only returns a string for each to use in the popup.

So may question is whether there is some way I can return an actual FeatureSet from my arcade expression to the popup config and use it to basically recreate the functionality that is available when checking "Show related data" (basically returning a list of the actual features to the popup that can be selected, zoomed to, etc.).  When I return a FeatureSet from my arcade expression my popup simply says "No information available".

Thanks,

Randy

0 Kudos
0 Replies