Hello,
I would like to know the best approach to a survey123 workflow using existing features in ArcGIS Online (a site parent layer with an inspection related table 1:M). The relationship is set up with GlobalID as the primary key and GUID as a foreign key. I need to ensure that the parent fields can be updated based on the related inspection records (i.e Last Inspected Date, Inspection Status, etc.), but no new parent records are created, only new related records (inspections). I also need to use the fields from the parent layer and the related table in the report template. I have one survey where initial inspections are submitted, and another survey for review, using the same feature layer.
For those of you who have done this workflow or similar, how did you set this up? I am in the process of testing the behavior when both surveys target the parent table (leveraging the inbox only), but I am facing an issue where the report is pulling every related record, not just a single inspection record. I also am testing targeting the related tables for both surveys as I would like parent and child records in each survey, but to avoid schema issues, I am left with either using pulldata @layer function for the parent fields and setting as null types, or duplicating parent fields into the related table to store the parent values so they could be added into the report. Unfortunately, the pulldata @ layer has not worked for me as it takes too long for it to load the value in the survey, and the data is not persistent. Of note, I tried using the relationship ${parent_table.fieldname} in the report that is generated from the related table, but I am only able to pull all of the records from the parent field, and not only the parent record that is related to the inspection record.
Also, if the related table is the target for the survey, and the parent fields need to be updated with the related records, is the best solution to use PowerAutomate/Make?
All of the videos I've seen keep the parent fields and related table fields in separate surveys, which does keep it fairly simple, but I would prefer if fields from both tables could be added to the same survey. Some of the posts I've seen related these topics and this workflow is a bit outdated, and some items may have been deprecated and are no longer relevant.
I’d really appreciate any insights or recent experiences with this type of setup. If you’ve found an approach that works well, or have run into similar issues and solved them, I’d love to hear how you tackled it.
Thanks in advance!