Hello,
I have created a Survey through Connect to open and edit an existing point feature by passing the GlobalID with URL parameters in a Web Map Pop-up. The workflow I am trying to accomplish is as follows:
- Select an existing asset on the map where you are performing a task for said asset
- Click the generated link in the Pop-up with URL parameters to open Survey123 app for said asset
- Survey123 form shows some of the fields for the parent asset and allows you to create a new related record for the current task.
- Submit form and update fields on the point layer, submit new related record.
I have got it working where I can open the record in Survey123 and manually update the fields and create the new record, but I am running into issues when trying to maintain/update a date field on the parent (point) layer. I have a date field for "Last_Inspected" that has an existing date when the last related record was submitted. I want the survey to preserve that date, unless a new record is submitted, which I tried to accomplish with the 'indexed-repeat()' function. However, this will delete the existing data when there is no new repeat record created, which is a problem since I need the users to be able to submit the survey even if they don't create a new related record (unable to perform the task). I tried to store the existing date in a NULL field on the survey using the 'Once()' function and do an 'If()' calculation on the date field but then that creates a circular reference in the table. I also tried to use URL parameters to store the existing date in NULL field from the pop-up, but I am unable to prepopulate any fields using the URL parameter '&field:field_name={Field}' - I am unsure if this is a bug, an error on my part, or due to the fact that I am editing an existing record that it will not pass any fields through the URL (I also tested with a 2 text fields in case there was some unexpected behavior with the dates).
I am at my wits end and I feel like I am so close to a solution to my workflow but I cannot figure out what I am doing wrong, or if there is another way to these dates to work how I need them to. Any and all suggestions are appreciated.
Thank you,
Zach