I want to add the surveyor's username into a field.
How can I pick up the username?
Thanks.
Do something like this:
The username question type will capture the currently logged-in user into a field in your layer, but will not be shown in your form. If you want to show the loggedin username into the form, use a note question as shown below:
For completeness, there is an alternative way to get the username using the property('username) function. However, this function only works in the Survey123 field app. At the moment, property('username') does not work in the Survey123 field app.
I tried this but it didn't work -pulldata("@property", 'username') how do you put the user name so I can have a message: "you are signed in as" and [esri username]
The readonly attribute shouldn't have any bearing on the report - that's only to indicate that the field is readonly in the collection phase.
If the field is turned to readonly=yes, will it appear in the report?
Thanks James.
You can use the property function to access the username if you want it in a visible field - see the 'Device and user properties' section in Prepopulate answers—Survey123 for ArcGIS | ArcGIS
Again, thanks for the reply James.
How can I get the Username to display on the survey though?
Hi John,
The using Survey123Connect, the easiest way to do this is to add a field of type username to the survey- the field will not be visible, but will record the username. Refer to the 'Question Types' section in XLSForm essentials—Survey123 for ArcGIS | ArcGIS That being said, Survey123 uses a feature call editor tracking (Editor tracking for feature services—Documentation (10.3 and 10.3.1) | ArcGIS for Server ) that automatically records the username (and date & time) of when a survey is submitted.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.