web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Full Names Split to Fi...
Power Automate
Answered

Full Names Split to First and Last

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I'm trying to extract customer names but the problem is that the full name is in one element and I need a First Name element and a Last Name element.  I'm extracting the full name via "get details of a UI element in window" (Jim J Adams) but I need just Jim as First Name field and then Adams as Last Name field

I have the same question (0)
  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    MichaelAnnis_0-1636390316499.png

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    We've talked about it in private message, but for others-  this works well when every customer has a middle initial but if a customer doesn't have a middle initial listed, it throws an error for TextList2 being out of range.

     

    So I'm looking for a solution to use for when clients may or may not have an initial.  Just FYI- I do not need the middle initial.  All I need is first and last name as variables from this data extraction.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Is there a way to add a random character to the middle initial?

     

    For example:  Client does not have a middle initial  (Joe Smith).  Bot extracts the value and puts a random character after the first separator ( which is a space), then it adds another space so now we have 2 space separators (Joe J Smith).

    If the client already had a middle initial (Joe J Smith), then the bot would still add the random character and we would still only have 2 separators (Joe XJ Smith), and thus could use the List Solution. 

     

    What would the vehicle be for adding that random character?

  • Verified answer
    MichaelAnnis Profile Picture
    5,727 Moderator on at

    Was in a meeting...here you go.  Same flow, but tested both with and without the middle initial to show result:

    MichaelAnnis_0-1636395956846.png

    MichaelAnnis_1-1636395996664.png

     

  • Highboy Profile Picture
    1,187 Super User 2024 Season 1 on at

    Highboy_0-1636398359445.png

     

    SET Name TO $'''First Middelname Lastname'''
    Text.SplitText.Split Text: Name StandardDelimiter: Text.StandardDelimiter.Space DelimiterTimes: 1 Result=> TextList
    SET Firstname TO TextList[0]
    SET Lastname TO TextList[TextList.Count - 1]

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I ended up using Pad text to the right side and used spaces and a comma.  I'll probably go back and redo it the way you guys have done it.  Thanks for your input!!

     

    h.JPGh1.JPGh2.JPGh3.JPG

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 223

#2
David_MA Profile Picture

David_MA 210 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 175

Last 30 days Overall leaderboard