Select to view content in your preferred language

Access Parent Attribute

230
2
03-30-2026 11:35 AM
JarredPaquinMC2
New Contributor

Hello,

I am unsure why my following code isn't working.

-----

var related = FeatureSetByRelationshipName($feature, "ACProductsGroundwaterSamplingPoints_ACProductsQuarterlySurveyForm")

return first(related)['WellID']
 
-----
I am trying to calculate a field in the child table based on the value in the parent table, but it's throwing an error.
Thanks!
0 Kudos
2 Replies
KenBuja
MVP Esteemed Contributor

Are you checking whether there are any records in related?

var related = FeatureSetByRelationshipName($feature, "ACProductsGroundwaterSamplingPoints_ACProductsQuarterlySurveyForm");
return IIf(Count(related) > 0, First(related)["WellID"], "No related records");

 

0 Kudos
JarredPaquinMC2
New Contributor

No, unfortunately that's not it. When I try to add a related record to the table using FieldMaps, it's still failing to calculate. Unfortunately FieldMaps does not provide very much in the way of error messages. 

0 Kudos