I am VERY new to Survey123, and am having to learn a lot to get two surveys working in way less time than it should be given. Just a disclaimer.
Have I missed something obvious? Am I trying to do too much? Any help or suggestions would be appreciated.
While looking up information about triggers, I found mention of Survey123 Microsoft Flow connector. Sounds like that might work. Anyone have any experience with it when using it to enter rows into a spreadsheet?
I use Integromat instead of Microsoft Flow, but very similar. In a few of my scenarios, I'm adding all of the repeat records for that specific submission to a Google Sheets file and then exporting to a CSV. It should be possible to accomplish what you're after by doing something similar and then using the ArcGIS REST API to overwrite your "linked content" CSV in your AGOL account with your updated CSV. I have updated feature attributes via Integromat in one of my scenarios, but not a linked CSV...fyi. Also, I believe that updating the linked CSV will only automatically trigger an update that iOS field app users will see. In my experience, I need to download the linked CSV in S123 Connect and then re-publish for Android users to see the updates).
Integromat scenario for hazmat sampling:
Branch that creates Asbestos samples CSV (In this case, from a repeat layer in the survey):
Create new google sheet -> Define the headers -> Move CSV (because I can't define the folder location when creating the CSV) -> Iterate through each record -> add record as a row
In your case, I imagine that you'd want to do something like:
JSON Query Collection Layer & Parse response -> Create a new CSV and populate the headers from your parsed query -> add a row for each record -> Export as CSV (With same name as your current linked CSV)-> Overwrite AGOL-Hosted CSV file.
You could probably skip the whole query & CSV setup if you just use the REST API to export the layer as a CSV file directly.
edit: This was the first time I set up a scenario to update existing features so it's a little wonky, but it works (and I couldn't get it to work via the query string options previously)
Thank you! I will look into this and see if it would be an option!
Hi! Did you ever get this to work? I'm trying to do something similar. Thanks
Hi @RobynSnookCCB - I gave up. I was (and still am) new to Survey123/ArcGIS and found this a bit too much. I'm looking into it again, though, so if you found something that worked I'd like to know.
Otherwise, what I did get to work was a java script that used JSON data and pulldata to query a layer of another (submitted) survey. Obviously this requires internet and is a pretty big drag on loading the form. If you'd like more information let me know.