
Announcements
Hello, I have created a stormwater inspection form via ArcGIS Survey123 for my organization. I was asked to automate email notifications when a site is inspected. I am currently trying to figure out how to go about trigger conditions in flow, but have run into some issues. Below is an overall rundown of the schema for this data.
Each project site falls into one of three categories (RSF,NON-VSMP,and VSMP) and questions displayed on the form are based off which of the aforementioned category types the user chooses. ESRI calls the group of question dependent on which project type the user chooses "repeats", which is an array, which in ESRI are stored in a relationship table. Inspections are done in increments of a week. So if one of our field crew guys were to inspect Jane Doe's site today, they'd come back in a week, open an existing survey, and add a repeat aka array item to the the original form. So ideally, a project site could have multiple inspections related to it. I will use the RSF Project type as an example.
Project Name:(stored in main table)
Location:(stored in main table)
Project Address:(stored in main table)
Project Type:(stored in main table)
Project Permit Number:(stored in main table)
Contractor: (stored in main table)
Contractor Contact Info: (stored in main table)
Contractor Phone(stored in main table)
Contractor Email:(stored in main table)
Overall Inspector:(stored in main table)
RSF Inspector:(stored in relationship table)
RSF Inspection Date:(stored in relationship table)
RSF Inspection Time: (stored in relationship table) This is autopopulated with current time
RSF Silt Fence Yes or No:(stored in relationship table) All Y and N questions have "Yes" checked as their default value
RSF Silt Fence Violation Comment:(stored in relationship table) The default text for this is no comment, but only shows on the condition that "No" was checked in the previous question.
RSF Construction Entrance Yes or No:(stored in the relationship table) The default text for this is no comment, but only shows on the condition that "No" was checked in the previous question.
Inspection Status: (stored in relationship tale) One of three options with "Compliant" being the default.
Correction Action Date: (stored in relationship table) This is conditional based of the Inspection Status Field.
Attachment 1: (stored in relationship table)
Attachment 2: (stored in relationship table)
Attachment 3: (stored in relationship table)
I have left several Y or N that will be stored in the relationship table off, but above is the just of it. Now I will provide several screenshots displaying what I have tried to do thus far.
These are the options when clicking on the array dropdown
These options are:
@triggerBody()?['body/feature/layerinfo/relationships']
@triggerBody()?['body/feature/attachments/Project_Final_Signature']
@triggerBody()?['body/feature/repeats/RSFINSPECTION']
@triggerBody()?['body/feature/repeats/NON-VSMP']
@triggerBody()?['body/feature/repeats/VSMP']
*I am assuming what is in red it the output for each time a user edits an existing survey and being a new survey instance in the relationship table.
Below is what the options menu looks like once I enter an expression. Please see expression and error message at the top.
So this accepts this expression, but it not bringing in the survey info in the following steps; therefore there is no dynamic content.
Can someone tell me what I am doing wrong? If need be, I can come back and attach the XSLX form as well.
Thanks in advance.