Hello, I am trying to populate a field (Site_ID) in a related table using the arcade function FeatureSetByRelationshipName. The related feature that I am trying to pull from is called MTH_Campgrounds.
In Field Maps I want to select a point (campground in this example case) and select the related table icon and enter data into the form I created for the table. Hopefully, this code will reduce the potential for error while inputting data into the table's form. The feature and table are related using Global IDs. The field in the table will be null at first.. so I am assuming there is an if then--first kind of arcade statement. This is where I currently am...
var related = FeatureSetByRelationshipName($feature,'MTH_Campgrounds', ["SITE_ID"], false)
return related
Thanks in advance!
Solved! Go to Solution.
There is an order of operations issue here. When the related record is created, I do not believe the Parent Global ID is applied to the child. This may occur on an update. So you could check on Update and monitor if that field has changed and then if the ParentGUID field has changed, then fire your rule.
Also, this code is the features GlobalID, not the Parent, you need to get $feature.ParentID field
var parent_id = $feature.GlobalID;