Hello, I am trying to populate a field (Site_ID) in a related table (campground_evaluations) 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. This is where I am, but I get a Execution Error:Cannot read properties of null (reading 'toString').
var related = FeatureSetByRelationshipName($feature,'MTH_Campgrounds', ["SITE_ID"], false)
var record = First(related)
if (IsEmpty(record)){
return "No Record Found"
}
return record['SITE_ID']
Thanks in advance!