I have a polyogn feature service which I use in a number of ArcGIS Online webmaps/apps and Field Maps. I also have a new table feature service. Both feature services have attributes in common.
Can I edit the popup on my polygon layer to use those common attributes to lookup values from the table? I can't find any examples online where this has been done without a Related Table relationship existing, or a geometric intersection being possible.
Example:
Tap polygon with name "Ferndale" to view popup
Arcade expression in Popup looks up "Ferndale" in the table feature service (also loaded in the map) and returns another attribute such as a document URL.
Solved! Go to Solution.
You will want to use the FeatureSetByID or FeatureSetByName function. This allows you to call another layer in within the map or feature service. FeatureSetByID is better as it's unique.
This will return all features from that layer, so you'll want to:
You can find an example of this workflow here under 'Obtain data from a different layer'
https://learn.arcgis.com/en/projects/access-attributes-from-another-layer-with-arcade/
It's also pretty similar to what is done here, but instead of using intersects, you use filters
Additional info:
https://developers.arcgis.com/arcade/function-reference/featureset_functions/
https://developers.arcgis.com/arcade/function-reference/featureset_functions/#filter
You will want to use the FeatureSetByID or FeatureSetByName function. This allows you to call another layer in within the map or feature service. FeatureSetByID is better as it's unique.
This will return all features from that layer, so you'll want to:
You can find an example of this workflow here under 'Obtain data from a different layer'
https://learn.arcgis.com/en/projects/access-attributes-from-another-layer-with-arcade/
It's also pretty similar to what is done here, but instead of using intersects, you use filters
Additional info:
https://developers.arcgis.com/arcade/function-reference/featureset_functions/
https://developers.arcgis.com/arcade/function-reference/featureset_functions/#filter
Thanks! Now to start understanding how it all works! I know what I want, but not only learning more about how Arcade works, but also HTML by the looks of it (if I want to format it as a table)....
I thought I'd let you know that the info in the links you provided has helped me successfully write Arcade codes which return the information I'm looking for in Popups. I was hoping to put these codes into the layers Visualisation settings, and for it to flow through to all maps that the relevant table is also loaded into (or it would return blank if table was absent). But it appears that this type of popup element doesn't seem to like WebAppBuilder apps. The popups are simply blank once implemented (even loses the existing fields list portion of the popup). Will have to dig further, and will also likely break the single Arcade code into chunks that can be returned individually (in a table format maybe?).
Yeah - I figured this would be the case. I have already started trying out Experience Builder with new apps, but the majority we have were built a while back when WebAppBuilder was the main offering. Think we're going to have to schedule an upgrade and migration process - just another thing on the to-do list!