Hello all,
I have a complicated set up to my question, so please bear with me.
I have a new workflow design where:
As a work-around to my related question, I did the following:
I created a Survey123 survey off of my inspection table and put it's URL link into my site layer's pop-up. The survey is quite simple; it pulls in the GlobalID from the site to retain the 1:M relationship and returns to FieldMaps upon submitting survey all in the URL parameters.
Survey123 URL link:
arcgis-survey123://?itemID=SOMEITEMID&field:REL_GlobalID={GlobalID}&callback=https%3A%2F%2Ffieldmaps.arcgis.app%2F%3FitemID%SOMEITEMID%26referenceContext%3Dopen
Then on the FieldMaps/new Map Viewer side, I created a Form Calculation to look through all the historic inspection records where site globalid equals the inspection record's guid, find the latest one, and use that value to auto-populate a "Last Inspected date" field in the site layer. The hosted feature layer view will then use that value to differentiate between those that haven't been inspected in many years and those that have been inspected within a year of today's date.
Form calculation on the "Last Inspected Date" field is:
var child=FeatureSetByName($map,"InspectionRecords",['INV_DATE','REL_GlobalID'],false);
var parentguid = $feature.GlobalID;
var sql = OrderBy(Filter(child,'REL_GlobalID=@parentguid'),'INV_DATE DESC');
var tbl = First(sql)
return tbl.INV_DATE
THE TROUBLESOME PART. After submitting the inspection survey, the "Last Inspected Date" calculation runs, BUT doesn't apply its edit to the site point. So the user doesn't see the site pop-up reflecting his submitted survey until he edits the site point. The new "last inspected date" can be seen then.
So the user would have to:
then he can see the survey's last inspected date come through into the site's pop-up.
My question is, is this expected behavior? Is there a better way to set-up this workflow so all requirements can be met?
Thank you for reading my tiny novel,
Caitlin