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 / Name showing surname f...
Power Apps
Unanswered

Name showing surname first, is there a way to change?

(0) ShareShare
ReportReport
Posted on by 321

Hi,

 

So in my Apps I like to prepoulate text in label, for example "Hi my name is" & ThisItem.'Created By'.DisplayName &  " nice to meet you". (Or along those lines).

 

But in these scenarios it shows surname first, so doesnt read a well. Is there a way to show first name first then surname?

 

Thanks in advance.

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @JimboSey 

    This is dependent on how your organization has set the display of names - first last, or last, first.

     

    However, if you want just the given name of the user, then you can utilize the Office365 User connector to get the full user information.  That information includes the given and surname separated.

     

    I hope this is helpful for you.

  • sgtsnacks64 Profile Picture
    322 Super User 2024 Season 1 on at

    Is it showing as:

     

    Surname, Forename

     

    If your data source offers Given Name/Forename and Surname separately, use these, else you could do the following:

     

     

    With(
     {
     seperator:
     Find(
     ", ",
     ThisItem.'Created By'.DisplayName
     )
     },
     Concatenate(
     Mid(
     ThisItem.'Created By'.DisplayName,
     seperator + 2
     ),
     " ",
     Left(
     ThisItem.'Created By'.DisplayName,
     seperator - 1
     )
     )
    )

     

     

    Or for the less complicated version 🙂

     

     

     

    Last(
     Split(
     ThisItem.'Created By'.DisplayName,
     ", "
     )
    ).Result 
    & " " &
    First(
     Split(
     ThisItem.'Created By'.DisplayName,
     ", "
     )
    ).Result

     

     

    Or

     

     

    With(
     {
     arr:Split(
     ThisItem.'Created By'.DisplayName,
     ", "
     ).Result
     },
     Last(
     arr
     ).Result 
     & " " & 
     First(
     arr
     ).Result
    )

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @sgtsnacks64 

    Or a slightly easier way to write that...

    With({_names: Split(ThisItem.'Created By'.DisplayName, ",")},
     Trim(Last(_names).Result) & " " & First(_names).Result
    )

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 477

#2
WarrenBelz Profile Picture

WarrenBelz 341 Most Valuable Professional

#3
11manish Profile Picture

11manish 317

Last 30 days Overall leaderboard