Public Survey - autopopulate field based on pulldata function

386
3
Jump to solution
09-01-2021 07:13 AM
RosemaryHatch
New Contributor III

I have a public facing Survey 123 (built through Connect) where users select the location for an application. A report then gets sent via an integromat webhook to our office. I would like to have the location of the geopoint determine who receives this email - I think I can do this using a pulldata javascript function (aka autopopulate a field based on an intersection with an existing feature layer), however I don't believe js works for public surveys.

Is there a workaround, or a creative solution for making this happen? It would be very useful for our workflow.

1 Solution

Accepted Solutions
IsmaelChivite
Esri Notable Contributor

Hi. If the survey is public, you cannot use a custom JS function to do the spatial query. However, I think it would be best to do that in Integromat anyways. In Integromat, you can use the HTTP module to make a call to your feature layer through the ArcGIS REST API, then parse the JSON response to figure out who should receive the email.  There is some info about how you could do the query in this blog post: https://community.esri.com/t5/arcgis-quickcapture-blog/data-enrichment-with-arcgis-quickcapture-and/...

View solution in original post

3 Replies
IsmaelChivite
Esri Notable Contributor

Hi. If the survey is public, you cannot use a custom JS function to do the spatial query. However, I think it would be best to do that in Integromat anyways. In Integromat, you can use the HTTP module to make a call to your feature layer through the ArcGIS REST API, then parse the JSON response to figure out who should receive the email.  There is some info about how you could do the query in this blog post: https://community.esri.com/t5/arcgis-quickcapture-blog/data-enrichment-with-arcgis-quickcapture-and/...

RosemaryHatch
New Contributor III

Hi @IsmaelChivite 

What are the security issues with using integromat in this way? As I delve deeper, it does look like it's best to not use webhooks at all with public surveys? Or at least use hosted feature layer views - which pose a problem when trying to update features. 

Thanks!

Rosemary

0 Kudos
RosemaryHatch
New Contributor III

That seems like what I was looking for - will take a bit to test it out. Thanks!

0 Kudos