0

Is it possible to change Users's display name in SharePoint workflow to first name & last name only?

Currently it is shown as "LastName,Firstname domain".

For example:

Current: Kumar, Ashok XYZ (here XYZ is domain Name)

Required: Ashok Kumar

  • Are you using SP designer 2013 WF? Are you trying to get the display name from Person or Group field? – Ganesh Sanap Sep 26 '19 at 4:39
  • yes using Sp designer WF and people picker as a column – kumar Sep 26 '19 at 4:40
1

First of all try fetching the display name of Person or Group field like given in below image:

enter image description here

If this is not working for you then you need to extract the First Name and Last Name from the string you are getting as a output from above image.

You need to use below actions for that:

  1. Set the Display name (same as above image) in a workflow variable.
  2. Find the index of Domain from above variable.
  3. Extract the sub-string from the variable.
  4. You can do similar steps if you want to get the First Name and Last Name in separate variable by finding the index of comma(,) and then extracting sub-string.

Reference of Actions: Utility actions.

Example: SharePoint Designer Workflow actions - how to get substring from start of variable until character "|"

|improve this answer|||||
  • this is useful , let me try this and get the output – kumar Sep 26 '19 at 5:05
  • Sure, try it and let me know if there is any problems doing it this way. – Ganesh Sanap Sep 26 '19 at 5:57
  • Have you tried this? Is it working for you? – Ganesh Sanap Sep 27 '19 at 17:06
  • 1
    yes it is working let me mark as answer – kumar Sep 27 '19 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.