HOW TO

Prepopulate a submitter’s first and last name using the pulldata() function in ArcGIS Survey123 Connect

Last Published: September 23, 2022

Summary

In ArcGIS Survey123 Connect, a survey question can be configured in the XLSForm to prepopulate the submitter’s first and last name using the pulldata() function. Certain surveys require submitters to fill in the name question, which can be tedious and is prone to spelling errors. Prepopulating these questions allows submitters to respond to a survey faster and ensures the name questions are not tampered with as they are extracted directly from the signed-in account. The expression is written in a pulldata(“@property”, ‘propertyname’) format. For more information on user properties, refer to ArcGIS Survey123: Device and user properties.

The workflow to prepopulate the submitter's first and last name using the pulldata() function in ArcGIS Survey123 Connect is demonstrated in this article.

Procedure

  1. In ArcGIS Survey123 Connect, open the XLSForm file of the survey.
  2. Add and configure the question to prepopulate the submitter’s first name.
    1. In the survey worksheet, under the type column, select text to add a text question type.
    2. Specify a value in the name and label columns of the question. In this example, the question is named 'first_name' and labeled 'First Name'.
    3. In the readonly column, select yes to prevent submitters from editing the answers.
Note:
To allow submitters to edit the answers, leave the readonly column empty, as default.
  1. In the calculation column, type the following pulldata() function to extract the first name:
pulldata("@property" , 'userFirstName')
The type, name, label, and readonly columns specified for the First Name question in the XLSForm.
  1. Add and configure the question to prepopulate the submitter’s last name.
    1. In the survey worksheet, under the type column, select text to add a text question type.
    2. Specify a value in the name and label columns of the question. In this example, the question is named 'last_name' and labeled 'Last Name'.
    3. In the readonly column, select yes to prevent submitters from editing the answers.
    4. In the calculation column, type the following pulldata() function to extract the last name:
pulldata("@property" , 'userLastName')
The type, name, label, and readonly columns specified for the Last Name question in the XLSForm.
Note:
To prepopulate the full name of the submitters in a single question, replace ‘userFirstName’ or ‘userLastName’ with ‘userFullName’.

The First Name and Last Name questions are prepopulated with the submitter's first and last name in the survey.

The prepopulated First Name and Last Name questions in the survey.

Article ID:000028379

Software:
  • ArcGIS Survey123 Connect

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic