English
Continue in the app
Be The First To Get Support Updates
Want to know about the latest technical content and software updates?

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

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.

Related Information

Last Published: 9/22/2022

Article ID: 000028379

Software: ArcGIS Survey123 Connect 3.9, 3.8, 3.7, 3.6, 3.5, 3.4, 3.3, 3.2, 3.15, 3.14, 3.13, 3.12, 3.11, 3.10, 3.1, 3.0, 2.9.Classic, 2.8