Restrict Extent of Submittals based on location

452
3
12-14-2020 11:19 AM
LindseyStone
Occasional Contributor III

I have a form created in Survey123 Connect and I have a geopoint created.  Within the Connect editor and testing the form my address locator that I have created and basemaps that I have created and set in my Organization Settings show.  When testing I can type an address into the map and it gives the suggestion within my address locator and the world one.  In addition, it will NOT allow me to select an address outside of my basemap making sure to keep my data local.  Now when I publish this survey and share it out to the public the address locator and basemap goes to the World Geocoding Service and the default ESRI basemaps.  So now the end user can submit a survey outside our local area.

Can I adjust it to show my address locator OR restrict the extent we will accept a survey submittal that way we are getting submittals from another town or state?

Tags (2)
0 Kudos
3 Replies
IsmaelChivite
Esri Notable Contributor

Hi. The difference in behavior may be caused by you be logged-in (in Connect) versus not being logged-in (app).

Make sure the locator view you created to restrict geocoding to your area is shared publicly. Also, if you are constraining locations using a custom JavaScript function, keep in mind that JavaScript functions will only execute when you are logged-in.

0 Kudos
LindseyStone
Occasional Contributor III

So this survey is for the public to fill out, so nobody will be logged in.  They were also be filling it via the web browser and not the app.  The address locator is shared publicly as I have it being used on other maps that the public is using.  In the settings of my Organization under Geocoding I have my address locator listed first and the World Service listed second.  This is how I was seeing it when I was testing it through Connect.

Constraining the location is kind of my question on HOW DO I do it on a public facing survey.

So I have two problems that I hope to fix by using my address locator.  One: I want it so they can't submit an address outside our County. Two: I have an address field being calculated based on the the address they select in the map.  With it using the World Address Locator it is doing a weird thing to commercial addresses.  So if I just type in a residential address it fills out that address into the address field but if I type a commercial address it fills in the business name in the Address field.  I need the commercial ones to be their address too as Residentials and Commercial locations will be filling out this survey.

Example:
Commercial Address: 705 N Burlington Ave, Hastings NE 68901 - Fills out Walgreens
Residential Address: 415 N Baltimore Ave, Hastings NE 68901 - Fills out 415 N Baltimore Ave, Hastings NE 68901

Survey: https://survey123.arcgis.com/share/6ac129cf4a254b1a9ca44d0fff0e7222

0 Kudos
IsmaelChivite
Esri Notable Contributor

Hi @LindseyStone 

Your scenario looks like a perfect fit for the new map-less geocoding functionality we added in the Early Adopter. Check for details here: https://earlyadopter.esri.com/project/article/item.html?cap=e69ef91f45744b98882c651f7b518eb7&arttype...

 

In short:

  • Using Survey123 Connect 3.11
  • Set the appearance of your geopoint question to geocode
  • In the bind::esri:parameters column, target your own geocode item by adding geocode=<item ID>
  • Use calculations in other questions to retrieve the geocoded address

 

0 Kudos