Select to view content in your preferred language

Automatically Populating Surveyor Name from Sign-In Credentials

226
2
2 weeks ago
HariharNepal
Emerging Contributor

How can i grab users name from the AOL aign-in credential?

In my survey, the “Surveyor’s Name” field used to a free‑text field, which allowed users to type their names manually. However, this often leads to inconsistent formatting—such as lower/upper case variations or including/excluding middle names.
To avoid these inconsistencies, is it possible to automatically populate the surveyor’s name directly from the AGOL sign‑in information? Since members must sign in to their AGOL accounts to use the survey, this would ensure accuracy and reduce manual input.
At the moment, I’m using a pulldata() function with a list of members stored in the media folder, and users select their names from a dropdown list. But if I can pull the name directly from the sign‑in credentials, I wouldn’t need to update the media file every time staff changes.

0 Kudos
2 Replies
Neal_t_k
MVP Regular Contributor

You can use the username question type to pull in the signed in user

Neal_t_k_0-1776349643261.png

Looks at the question type tab in your xlsx. You would just have to calculate your question to the user name as username question type is hidden.

Otherwise pulldata("@property", 'propertyname') if you want to calculate directly

Prepopulate a Submitter’s First and Last Name Using the Pulldata() Function in ArcGIS Surv

Prepopulate answers—ArcGIS Survey123 | Documentation

 

 

AlfredBaldenweck
MVP Frequent Contributor

To piggyback here, this is my calculation I use

concat(pulldata("@property", "userFirstName"), " ", pulldata("@property", "userLastName"))

This yields "John Smith" 

0 Kudos