Select to view content in your preferred language

Pass Values from Survey123 to Feature Class

1526
5
Jump to solution
09-28-2021 11:27 AM
KristinThorpe1
Regular Contributor

I know it's possible to pass values from the feature class to Survey123 with custom URL parameters, but is it possible to pass values from the survey to the feature class? 

I created a survey in Survey123 Connect (Construction Inspection) from an existing feature layer (Construction Point). The survey will be used to take routine inspections of construction projects. One inspection question asks for the Inspection Phase: Project Meeting, Special Project Meeting, Inspection, Completion, etc. I want to pass the inspection phase from the Construction Inspection to update a "Phase" field in the Construction Point feature layer. This will help keep track of the project phase and any deficiencies found at the construction site. Can this be done with a custom URL? Maybe as part of the callback parameter? What about using Integromat with a survey submission trigger?

0 Kudos
1 Solution

Accepted Solutions
DerrickWestoby
Frequent Contributor

You can do this with integromat.  I have a scenario for "UAS Flight Logs" that updates a pilot's cumulative total flight hours on submission. 

DerrickWestoby_0-1632858731115.pngDerrickWestoby_1-1632858782353.png

 

View solution in original post

0 Kudos
5 Replies
DerrickWestoby
Frequent Contributor

You can do this with integromat.  I have a scenario for "UAS Flight Logs" that updates a pilot's cumulative total flight hours on submission. 

DerrickWestoby_0-1632858731115.pngDerrickWestoby_1-1632858782353.png

 

0 Kudos
KristinThorpe1
Regular Contributor

Thank you! This definitely gets me in the right direction! Can you provide guidance on how you set up the query? I'm trying to query the feature layer to return the Construction Point where the Global ID is equal to the Construction Inspection KEY. I set up the relationship class between the GlobalID field of the point layer and KEY (GUID) field of the Inspection table (GUID). My goal is to isolate the Construction Point that was inspected and update its fields. Is this the correct workflow?

0 Kudos
DerrickWestoby
Frequent Contributor

Honestly, it took a ton of trial and error for me to get this working and it was my first and only experience with trying to push updates back to a feature layer like this.  

I used "Postman" to test the URL string that I was using (also, a lot of trial and error).  I'd definitely recommend you install that and use it to test out your request before bringing it into Integromat.  I couldn't get it to work when I was adding to the query string, so I just used the entire URL (including the query parameters) in the "URL" entry box on Integromat.  

This is the page you're going to want to reference - https://developers.arcgis.com/rest/services-reference/enterprise/update-features.htm 

And then use Postman to start working on replacing the example parameters with yours - https://www.postman.com/downloads/ 

You can also download a collection of ArcGIS REST queries from here (the one to generate a token was very handy for testing, but not used in Integromat because the Survey123 submission in my scenario generates a token as well) - https://github.com/esri-es/ArcGIS-REST-API

 

0 Kudos
DerrickWestoby
Frequent Contributor

Let me know if you're not able to get anywhere with the links above.  I probably wouldn't be able to do this until the 2nd week of Oct, but I could copy my integromat blueprint out and remove all of the confidential info and send it to you if needed. 

 

0 Kudos
KristinThorpe1
Regular Contributor

I ended up getting it to work. It was putting my GlobalID in curly brackets instead of quotes. A lot of trial and error! I've been plugging away all day. I will check out those links and let you know if I have other questions! Thanks again!