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 Apps / Last name's initial le...
Power Apps
Unanswered

Last name's initial letter is sometimes blank

(0) ShareShare
ReportReport
Posted on by 107

I want to get the first and last name initials of the user.

I used DisplayName: User().FullName for _currUser.DisplayName, and the code below to get the initials but for some cases (3 names or more) this won't work.

 

Concatenate(Left(_currUser.DisplayName, 1), Left(Right(_currUser.DisplayName, Find(" ", _currUser.DisplayName)), 1))

 

 I know there is  MyProfileV2() but I wish using that will be my last option.

Categories:
  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    Hi

     

    Try this

     

    Concatenate(
    Left(
    Trim(_currUser.DisplayName),
    1),
    If(
    Len(
    Trim(
    Right(
    _currUser.DisplayName,
    Len(_currUser.DisplayName) - Find(" ", Trim(_currUser.DisplayName))
    ))
    ) > 0,
    Left(Trim(
    Right(
    _currUser.DisplayName,
    Len(_currUser.DisplayName) - Find(" ", Trim(_currUser.DisplayName))
    )),
    1
    ),
    ""
    ))

     

    Thanks!

     

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation. 

  • rzainm Profile Picture
    107 on at

    Hi @Rajkumar_404 

     

    thanks for the response. I tried using your code but it works for people having one first name. If user has 2 or more first names eg. Angel Mae Smith, etc. it will get the initials for Angel Mae.

  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    Try this

     

    Concatenate(
    Left( User().FullName & " " , 1),
    " ",
    Mid(
    User().FullName & " ",
    Find(" ", User().FullName & " " ) + 1,
    1
    ),
    " ",
    Right(
    User().FullName & " " ,
    Len(User().FullName & " " ) - Find(" ",User().FullName & " " , Find(" ",User().FullName & " " ) + 1)
    )
    )

     

    Thanks! 

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard