I am wanting to populate a field on one layer from a field with the same name on another layer based on a common global ID and am having difficulty figuring out the arcade code to do so. I do not have much experience with this kind of coding using arcade.
If you have a relationship set up between the two layers, you can use this syntax to get an attribute from the other layer
var related = FeatureSetByRelationshipName($feature, 'your relationship name'); if (Count(related) > 0) { var record = First(related); return record.theField; }
If not, you can use this syntax to get the other feature.
var asset_id = $feature.GUID var fs = FeatureSetByPortalItem( Portal('yourPortal'), 'itemId', 0, ['*'], false ); var related = First(Filter(fs, "GlobalID = @asset_id")) if(related != null) return related.theField
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.