cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Workflow Hero

Auto populate single line field with current user

Jump to solution

Hi

I'd like my Nintex form to have this field auto populated with the current user's Full Name however I can only find 'CurrentUser' which prefix's the username with the domain name. Is there another way to do this without using the people picker? Thanks

Labels: (3)
Tags (1)
Reply
9 Replies
Workflow Hero

Re: Auto populate single line field with current user

Jump to solution

nick Farrington‌ - 

You can easily do this by using a Calculated field on your form and connecting it to the desired field. In your formula, you can use the userProfileLookup function (under Runtime Functions, it is the last one in the list) and go after "PreferredName". It would look like this:

On the form: 

If you want to do [First Name] [Last Name], you will need to do it like so:

On the form:

I would check out Default user profile properties (SharePoint Server 2010)  to see all of the options you can go after using the userProfileLookup function on the form.

Hope this helps!

*updated one of the screenshots... used the wrong one

Reply
Workflow Hero

Re: Auto populate single line field with current user

Jump to solution

if yuo only need to remove domain from what CurrentUser retuns you can use one of string inline functions to do so.

if you do populate controls value through 'Default value' option from configuration dialog, note that it's evaluated just once when form is opened and only when you create new item.

the other option is to populate control's value from javascript.

this is much more flexible but need some experience with javascript.

Reply
Workflow Hero

Re: Auto populate single line field with current user

Jump to solution

Hi, I have connected the calculated field to the single field text control and it does not populate it. I can confirm the calculated field is working fine. Could it be because I am using the single text field in a repeating section?

I think even if I get it to work I may a have an issue where the control changes previously entered field values due to me using a repeating section

Reply
Workflow Hero

Re: Auto populate single line field with current user

Jump to solution

I can trim the field but I want full name

Reply
Workflow Hero

Re: Auto populate single line field with current user

Jump to solution

nick Farrington‌ - 

Do you have the "Connected to" control on the form still?

If so you have to either remove the control from the form, or (for some reason this works for me), put the Calculated field at the bottom of the form (or any where after the "Connected to" field).

Also, if you are planning on using CurrentUser, you may want to think about if the controls will update when another user accesses the item later on. Meaning, you may need some rules in place to only use CurrentUser in NewMode only.

Reply
Workflow Hero

Re: Auto populate single line field with current user

Jump to solution

Jessie gave you the solution to display the full name. Did that work for you?

0 Kudos
Reply
Workflow Hero

Re: Auto populate single line field with current user

Jump to solution

Jesse, I have tried this but still no Joy. I do not think this will work in a repeating section...have you tried this using a repeating section? Either way this certain list item will be edited by different users so I think I may have to request the user input their name manually.

With this said the answer is still correct and I have implemented it elsewhere on other forms so thank you.

Reply
Workflow Hero

Re: Auto populate single line field with current user

Jump to solution

I have not tried this within a repeating section control but I will have to take a look because now I am curious!

0 Kudos
Reply
Workflow Hero

Re: Auto populate single line field with current user

Jump to solution

Very helpful. I was searching the Internet for a while with no luck until I saw this thread. Thanks!

0 Kudos
Reply