I have user display names in this format:
Last, First M DEPT REGION COUNTRY
// Smith, Bob R ACCOUNTING WEST USA
I want to show the name in this format:
// Smith, Bob
Here's my current expression (which is close, but it includes the middle initial):
// Smith, Bob R
I'd like to get rid of everything after the first name, including the middle initial. I've tried indexOf() and substring(), but haven't been able to find the right combination.
Solved! Go to Solution.
Here's my final expression :
concat(split(item()?['Employee/DisplayName'],' '), ' ', split(item()?['Employee/DisplayName'],' '))
// Result: Smith, Bob
I added concat() to join the last name with the first name (with a space between the names).
Keep up to date with current events and community announcements in the Power Automate community.
A great place where you can stay up to date with community calls and interact with the speakers.
Check out the latest Community Blog from the community!