I am relatively new to Arcade and trying to wrap my head around this, if it's even possible. I have a point layer (Catch Basins) that contains a related table (Inspection Table) for my users to input a new record each time a catch basin is worked on using Field Maps.
I'm wondering if there's a way to send a value from the input form (which is currently on the Inspection Table) to the point layer to dynamically update the Current Condition field of the point layer with a calculated expression in Field Maps Forms. I would like to symbolize by this field on our maintenance Web Map so we can immediately see where the current condition is Poor or worse.
So to be clear, users are creating data on a tablet using Field Maps in the Inspection Table, but I'm trying to send the reported condition field to the Point Layer when that information is submitted by the user on the tablet form for the related table.
Here's what I have so far. I've used a filter to match the AssetID values of the point and related table records, and then successfully stored the most recent condition information into an array. I just don't know how to push it to the point layer field "CurrentConditionTemp".
//Define related table assetID
var AssetIDInspectionTable = Text($feature.AssetIDInsp)
//Define related table featureset to sort by date and condition later
var InspectionTableSet = $featureset
//Define Asset ID and field to populate point
var CatchBasinPoint = FeatureSetByRelationshipName($feature, "Collection_Backward",['ASSETID','CurrentConditionTemp'])
//Create filter to match AssetIDs
var FilterMatch = (Filter(CatchBasinPoint, 'ASSETID = @AssetIDInspectionTable'))
//Define empty feature array and Output object to populate output
var ConditionArray = [];
var Output;
//Iterate over inspection table
for (var f in FilterMatch){
//Sort by inspection date
var recentInsp = First(OrderBy(InspectionTableSet, 'Date_Authorized DESC'))
var latestCondition = recentInsp['Condtion_Insp']
//Push latestCondition into output object
Push(ConditionArray, latestCondition)
}I've used a similar setup in PopUp configuration to pull related table info into the point layer, but that doesn't allow me to symbolize. Unless there IS a way to symbolize by PopUp, in which case I'd love to learn how to do that because it would solve this issue.
How do I send the "latestCondition" value from the table to replace the "CurrentConditionTemp" field in the point layer?