Select to view content in your preferred language

map viewer, forms, and related data

407
2
Jump to solution
08-15-2024 09:57 AM
Labels (2)
clt_cabq
Frequent Contributor

I have a feature class with three 1:M related tables.  The features represent properties, the tables each reflect different periodic reviews that may occur for a given property. When a user creates a new record in one of the related tables, I'd like to update certain fields in the feature table so that the feature table contains the most recent information from a review. Can I trigger that sort of child-to-parent update from a form developed in the map viewer? 

0 Kudos
1 Solution

Accepted Solutions
MarkBockenhauer
Esri Regular Contributor

Yes, you can.

You can calculate a field in your feature class based on the value in a related table.  

One technique is to the set a value based on the most current related record.  This is an example of an Arcade pattern that can be used to do that.

MarkBockenhauer_0-1724424625613.png

var relatedRecords = First(orderBy(FeatureSetByRelationshipName($feature, 'relateTest_inspectionTable'),"CreationDate DESC"));

return relatedRecords.Status

 

View solution in original post

2 Replies
MarkBockenhauer
Esri Regular Contributor

Yes, you can.

You can calculate a field in your feature class based on the value in a related table.  

One technique is to the set a value based on the most current related record.  This is an example of an Arcade pattern that can be used to do that.

MarkBockenhauer_0-1724424625613.png

var relatedRecords = First(orderBy(FeatureSetByRelationshipName($feature, 'relateTest_inspectionTable'),"CreationDate DESC"));

return relatedRecords.Status

 

clt_cabq
Frequent Contributor

thank you - i have used a similar pattern for dashboards and such, i wasn't entirely certain if it would work in an editing scenario. I will play with this a bit!

0 Kudos