Autopopulate secondary field based on interger

2862
3
05-20-2016 12:39 PM
OscarSepulveda_III
Occasional Contributor

Hi Everyone,

New to this community, so please bear with me.

How do I auto populate a secondary field based upon the text inputted?  I have employee IDs that are a mix of text/interger (P356) with the employees full name (Oscar Sepulveda III) in the choices list.  I want the survey to auto populate the Full_Name based upon the entry within Employee_ID.  In excel I would use an array formula, yet again I am new to Survey123 and trying to figure this out.

typenamelabel
dateTimeDate_TimeDate and Time Form Completed
textEmployee_IDEmployee ID Number
textFull_NameFirst and Last Name
0 Kudos
3 Replies
KylePyne
New Contributor III

Hi Oscar,

I have a very similar question, so I hope you get an answer! The workaround i'm currently using may help, but i'm not sure if it is the simplest solution.

In the choices tab you can add an extra column, maybe "id_code", alongside your employee ID list and populate it with all of the employee ID values.

Then, change the Full_Name row type from text to select_one "listname" and under the choice_filter column add "id_code=${Employee_ID}". 

This will populate that employees name as the only option, however, the employee must select his/her name for it to populate.

I am trying to find a way for the row to auto-populate after referring to a list, and this is the only method I have found

OscarSepulveda_III
Occasional Contributor

Hi Kyle,

This worked perfectly, yet how can I populate multiple attributes for an employee based on their id_code ?

0 Kudos
EdApalinski
Occasional Contributor

Hi,

I know it has been awhile since this was posted, but I wanted to pass along a solution I found while trying to do the same task.  You can use the pulldata() function (pulldata blog) to calculate a field in the form from a preloaded csv file.  The csv file needs to be copied into the media folder so it can be accessed (C:\Users\youruser\ArcGIS\My Survey Designs\Your Survey\media).

For instance, I have a form for reporting endangered species sightings where the user selects the common name, then the form calculates the scientific name, endangered species ID, & global common name based on the common name.  The calculate field is typically hidden so if you wish to view the 'pulled data' you can use a note function to report the info to the user.

Ed

0 Kudos