Users select location for display on a map/dashboard

668
2
08-05-2020 03:10 PM
JadeDean1
New Contributor

Hello,

I am making an internal survey and want participants to select what office they are located in so we do not capture their current location. The ultimate goal is to display information from the survey on a map/dashboard.

In Survey123 Connect, I populated a field with the office location that takes on this format (210 offices total): [Office Name], [Address format: Site Address, Suite, City, State, Zip Code, Country]

In the Survey123 Connect form, the field's type is select_one; appearance is autocomplete.

After reviewing the Q&A's in the forum, I feel like my request falls between these two posts:

Survey123: Best approach for selecting location from restricted list of villages 

location using address 

Questions:

1. Is there a way to display the office location data as the survey is filled out?

2. Is Survey123 capable of geocoding? It's certainly alluded to in the second link, but I'm having trouble finding the link to a tutorial/explanation. Could someone provide me a link to a tutorial that goes over this workflow? Does this cost credits? If so, how many credits would this cost? We are anticipating 500 unique responses for this survey.

3. I have an existing feature service published with office locations and was able to create a form in Survey123 Connect. However, when I attempted to publish, I received this error:

The custom feature service submission url is not compatible with this survey (fields not found in the feature service: 3).

Would this be a better approach to capturing this information? If so, how can I fix the data to get rid of this error?

Thanks for taking the time to read and I hope to resolve this soon.

0 Kudos
2 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Jade,

In the situation you describe (you have existing locations), it is normally recommended to provide the list as a single choice question and then calculate the location based on the response.  See the 'Calculate Location from Choice List' and 'Calculate Location from CSV' Samples available in Survey123 Connect.

Yes, you can geocode within the Survey123 map questions.  See Geopoints—ArcGIS Survey123 | Documentation for more details.

It sounds like the layer of existing office locations is a resource that you would like to be used by the form, not the feature class that you want the responses to placed in.  It shouldn't be the submission URL.  I will note that with 3.10, Survey123 has introduced the option to query feature services for values in much the same way as you would use a CSV file; see Extending Survey123 smart forms with custom JS functions and the 'JavaScript' sample for more information.

JadeDean1
New Contributor

Hi James! Thanks for answering my question. I was able to find 'Calculate Location from CSV' but not 'Calculate Location from Choice List' in Survey123.

 

I have a follow up question. Using the 'Calculate Location from CSV' file as a reference, I created a CSV for the office locations, with a lat/long field. Then, I named the fields in the CSV the exact same as the reference file and copied the formulas exactly and filled in the field names to match my CSV. However, when I refresh in Survey123, I get the option for the office location on a map but it does not link with my coordinates. How can I fix this?

The overall formula for the Lat/Long CSV data is:

pulldata([CSV file name], [CSV field name], [CSV field name], [name of field in survey])

pulldata('office', 'LAT', 'officeID', ${Offices})
pulldata('office', 'LON', 'officeID', ${Offices})
concat(number(${LAT}), ' ', number(${LON}))
${locationcalculation}

select_one office_listOfficesOffice
calculateLAT
calculateLON
calculatelocationcalculation
geopointlocationOffice location on a map
0 Kudos