Display First Name Last Name in Workflow email text

  • 19 January 2016
  • 20 replies
  • 107 views

Badge +2

I am using Nintex workflow to notify the parties via email the parties involved in Person fields.

I would like to set the email text to display the names first name last name - like Robert Perkins, not Perkins.Robert

seems like this should be simple, but I am having trouble with it.Learn More


20 replies

Userlevel 4
Badge +8

Robert -

Could you clarify a few things about your question...

  1. When you say, "set the email text", which text are you referring to (the TO field, FROM)?  Please send a screenshot of what you would like to change.
  2. Are you sending the message to an internal user in your network or an external email address?
  3. Are you sending the from the "Send Notification" action or is this related to Task Notification within a task action?
Badge +2

Thanks for your interest. Sorry for the confusion.

1. I am OK with the To and From Fields. I am trying to populate data in the email body.

email body wording as follows: <<Business owner>> is a custom list item. (Person)

want the item to display Robert Perkins, not Perkins.Robert.

"Thank you for your recent technology request.
Your request has been sent to <<BUSINESS OWNER>> for
validation.  <<BUSINESS OWNER>> must validate the request for
it to be sent for analysis and review."

2. internal user, but I have that working ok.

3. Sending from send notification action.

Userlevel 4
Badge +8

Ok, so I assume you have a variable or a column of type "Person or Group", right?  In that case, all you need to do is create a new variable of type Single line of Text, call it something like BusinessOwnerDisplayName.  Then use the Set Variable action to set the BusinessOwnerDisplayName to either a variable or a column.  However, if you click the ellipsis (...) after the value you are assigning to, you will be able to select the return type of the value.  If you are converting from a People or Group variable or column, then you can select the return type as "Display Name", as shown below.

You can then use the BusinessOwnerDisplayName for the <<Business Owner>>.

167566_pastedImage_0.png

Badge +2

Feeling stupid here.. but this is what I am doing.

Business Owner is a column with type Person or Group.

167691_pastedImage_4.png

  1. Variable BusinessOwnerDisplayName is Created as Single line of text.

167430_pastedImage_0.png

2.  Set Variable action set the BusinessOwnerDisplayName to either a variable or a column.

Here is what I am doing.

167692_pastedImage_5.png

3. Here is what I am getting.   still <last name>.<First name>???

167690_pastedImage_3.png

Badge +7

Well,  could it be,  that in your active directory the display name is [lastname].[firstname]? This setting is referring to an OOTB SharePoint feature, which is just providing whatever is stor in your ad.

Userlevel 4
Badge +8

You'll need to check with your network admin on how the display name is configured in AD.  You could however use the Build Sting action with some functions to parse / format the display name as you wish.

Your screenshot appears to have the rest of it configured properly as I suggested in my prior reply.

Tom Castiglia

Badge +2

That might be my solution, since the admins at the farm will not change active directory. I know how to build a string, but not aware of a out of the box function for parsing/ formatting... would need to be able to identify the position of the "." ?

Badge +6

Robert,

I developed a UDA that does a LDAP query to return specifics of an AD account. So for example, it returns the Firstname, lastname, phone details etc and also a combined fullname, among other things. You should be able to pull in any AD properties you require. I too was getting the issue with Display Name showing "Lastname, FirstName" and found it undesirable in messaging.

Cheers,

Mark

Userlevel 6
Badge +12

Hello steve k​ -

This is probably the most straightforward approach if you can leverage User Profiles. If you cannot, for whatever reason, Paul Frederickson​'s post above accomplishes the same thing and provides the same results.

Robert Perkins​, let us know what you landed! Also, be sure to mark your question answered so others can quickly see what you did to solve your issue.

Thanks!

Badge +8

Hi Tom

This was very helpful. Not sure how the set action works. In the body of the email, do you use the "BusinessOwnerDisplayName" variable where you want the name to go or do you continue to just use the regular field name now?

Thanks!

Userlevel 4
Badge +8

Josh,

Are you referring to the example above from Paul Frederickson posted?  If so, you would use the Displayname.  You could potentially use either depending on which value is easier to parse.  In this case, the Displayname would be easier.

Regards,

Tom

Badge +8

I was referring to your post actually. I changed them all to display name, because that made more sense to me, so we will see how things work.

Thanks!

Badge

This does not work for me.  I have tried everything but the correct way.  I got one to work, but the others -NO...

*****please help*****

Badge +8

Scott

I don't see this link referenced but this is how I do it and it works every time.

https://ootbtutorials.com/2016/05/01/person-name-login-name-nintex-workflow-emails/

Badge

Josh, I am using Nintex for O365 and the screens are different.  IN the one instance I got it working (Gannon, Marc) but in all others that I have created, it is the same:  i:0#.F|membership|Email address

Badge +8

Scott. I am in SP13 but in my case I needed to replace 2 names so I used 2 Set Variable actions. Looks like yo only have the one?

Badge

I tried a second set variable and still get: 

i:0#.f|membership|scott.bryer@carlisleccm.com

Badge +8

Hmm. Can you send a snapshot of your variables? and your Set Variable settings for those 2?

Badge

Josh-

This helped!  In the email configuration screen I was just dragging and dropping the variables thinking they were formatted.  NOPE!  All good now.

https://community.nintex.com/message/65670-i0fmembership

Badge

Thanks Buddy it was the easiest way and worked for me

Also it works for people having middle name 

Reply