Select to view content in your preferred language

Pre-FIll User First and Last Name

2873
10
Jump to solution
08-08-2022 07:29 AM
JordanHolt
Occasional Contributor

Hello!

I am trying to pre-populate a "FIELD CREW NAME:" field with first and last name of the user signed in but I am unable to get it to work. Currently I am using "pulldata("@property", 'userFullName')" but it returning "UNKNOWN" in the field. I am the one signed in so I would think it would return my name. I have the "bind::esri:parameters" field set to "calculationMode=auto". The goal here is to eliminate as many clicks as possible so this would be very nice to know who submitted the data without having them select from a drop down. 

 

Thanks!

Tags (1)
1 Solution

Accepted Solutions
DavidForbuss1
Frequent Contributor

I use the 'username' tag like this.  It returns the username of whoever is currently logged into S123:

DavidForbuss1_0-1659971031613.png

 

View solution in original post

10 Replies
DavidForbuss1
Frequent Contributor

I use the 'username' tag like this.  It returns the username of whoever is currently logged into S123:

DavidForbuss1_0-1659971031613.png

 

IsmaelChivite
Esri Notable Contributor

Alternatively, you can also use pulldata as shown below. Also attaching an XLSForm to this message.

IsmaelChivite_0-1660067990826.png

 

JordanHolt
Occasional Contributor

This is put into the "Calculation" field?

0 Kudos
JordanHolt
Occasional Contributor

This is the return I get when I use the 'pulldata' 

JordanHolt_0-1660069271945.png

 

0 Kudos
DavidForbuss1
Frequent Contributor

Try pulldata("@property", 'username') -- with the double quotes around the @property part.  I haven't tried it like that yet, but that's how it's documented here: 

https://doc.arcgis.com/en/survey123/desktop/create-surveys/prepopulateanswers.htm

 

**Oops, just saw that you tried that already.  I'll give it a try on my end and see if I can get it to work.

 

0 Kudos
JordanHolt
Occasional Contributor

Below is what I have currently! Do you see anything that I am missing?

JordanHolt_0-1660172011787.png

JordanHolt_1-1660172056131.png

 

0 Kudos
DfIRivers
Frequent Contributor

I'm having the same issue.. the

 - pulldata("@property", 'username') in the Calculation field works fne for me, but if I change it to..

 - pulldata("@property", 'userFullName') then I get the same mesage on my form as Jordan has described.. i.e.

Unknown @property: userfullname

by Anonymous User
Not applicable

I'm having a similar issue with the pulldata("@property", 'userFullName') function. 

In my case this works fine for me and some users but when other users log into the survey they get the error message described above. Both the 'username' and 'email' properties work fine but userFullName causes an error. The other users are logged in with Creator privileges so it is hard to see how this could be permissions related.

Could it be something about the name itself? Are there certain formats or characters in the name that might cause this error?

0 Kudos
IsmaelChivite
Esri Notable Contributor

Hi.

 

@DfIRivers  @Anonymous User  For the Unknown @property: userfullname error, I bet the problem is the version of the Survey123 app used.  If you install the latest version it should work.

Older versions of the app do not support userFullName.