AutoPopulate Answers to survey 123 connect form

533
3
05-11-2021 04:39 AM
SpandanaGogineni
New Contributor

Hi team, I am using the survey 123 connect form, in this form I want answers automatically populate based on the name remaining text boxes will populate from the feature service. How can I populate using pull data, is any code required? can any one please help me in this?

0 Kudos
3 Replies
KayleeRivera
Esri Contributor

Hello! I think we need a little bit more information to really help you with this. When you say you want remaining answers populated based on Name -- do you mean based on the username of the currently logged in user? Or are you truly pulling from a feature service?

If you're using a feature service, you can use a javascript function (specifically, you'll want to focus on the the Working with web services section). Note: this is not currently an option with public surveys.

0 Kudos
SpandanaGogineni
New Contributor

SpandanaGogineni_0-1620747405202.png

Thanks, KayleeRivera for your response, This is the reference form, if I select the name of the business then automatically related business address will populate in the address field. That means before I submit the form those business name address will populate in that field.

0 Kudos
KayleeRivera
Esri Contributor

Ah, I see. There are a few ways to do this:

  1. Pulldata from CSV -- Create a CSV with the Name and Address fields; use a pulldata function in the calculation column for the Address field. This is a good option if the CSV won't be updated very often.
  2. Pulldata from Feature Service using Javascript -- this is good if the data will be updated on a regular basis. It can also only be used if the survey is not public-facing.
  3. URL Parameters from a webmap -- If your users will be starting from a webmap, you can configure the popup to take them to a survey where the Name & Address fields are pushed from the map. For example, if they clicked on the point on the webmap where Amazon is located, you would configure the url to look something like this: https://survey123.arcgis.com/surveyID?field:Name={Name}&Address={Address}. When they click that link, in the map's popup, it would take them to survey with the Name and Address fields already filled in.
0 Kudos