cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

How to Split a SharePoint DisplayName from a People or Group Field

Hello,

 

I have a gallery from a SharePoint site and there is a people picker field (person or group) where users can assign tasks to themselves. I can display the user name in the gallery without issue, but cannot figure out use the Split function to only show the first and last name. For example, the field I'm pulling is ThisItem.AssignedTo.DisplayName, which results in Doe, John (XXX-California). The XXX-Calfornia represents the part of the organization and region of the user. I want to only show Doe, John

 

When I use the Split or Left/Split functions, it gives me an error saying Expected Text Value

Examples: 

  • Split(ThisItem.AssignedAT.DisplayName, "(").Result
  • Left(Split(ThisItem.AssignedAT.DisplayName, "(")).Result

Any suggestions on how to do this? Thanks!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User III
Dual Super User III

Try the following:

First(Split(ThisItem.AssignedAT.DisplayName, "(")).Result


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
Dual Super User III
Dual Super User III

Try the following:

First(Split(ThisItem.AssignedAT.DisplayName, "(")).Result


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Worked like a charm! Thanks @Pstork1!

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Kudoed Authors
Users online (24,545)