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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to change DisplayN...
Power Apps
Unanswered

How to change DisplayName to first and last name

(0) ShareShare
ReportReport
Posted on by 239

Hi folks, 

 

I've added a person type column to my form and when the person is selected from the Outlook directory, I want to display their first name and last name in a separate text input field. 

 

Out of the box, I can display the selected person's DisplayName by (cmbEmployeeName.Selected.DisplayName), but this reads (in our organisation) as: LastName, First Name + Initials + Region such as Parker, Peter PP [ATL]

 

Is there a way that I display it instead as Peter Parker

 

Thanks! 

Categories:
I have the same question (0)
  • JeanL Profile Picture
    53 on at

    Hi, on the app I'm working on, I have this in a label:  

    Concatenate("Welcome ", User().FullName)

    So far, none of my testers has said it was wrong.

  • SebS Profile Picture
    4,582 Moderator on at

    Hi @AuburnMist 

     

    If I good remember, People column uses O365 users Connector try then.

     

     

     

    (cmbEmployeeName.Selected.GivenName&" "&cmbEmployeeName.Selected.Surname)

     

     

     

     

    Sorry, The above should do the Trick. The property of the GivenName should retrieve the First name and Surname will Give You the Surname 🙂

  • AuburnMist Profile Picture
    239 on at

    Thank you both for your replies, unfortunately, neither solution works. I continued to research and found this code, which works perfectly. 

    First(Office365Users.SearchUser({searchTerm:cmbEmployeeName.Selected.DisplayName})).GivenName&" "&Last(Office365Users.SearchUser({searchTerm:cmbEmployeeName.Selected.DisplayName})).Surname

     

  • MVP-Phipps Profile Picture
    3,508 Super User 2024 Season 1 on at

    You should be able to do:

    First(Office365Users.SearchUser({searchTerm:cmbEmployeeName.Selected.DisplayName})).GivenName&" "&Last(Office365Users.SearchUser({searchTerm:cmbEmployeeName.Selected.DisplayName})).Surname

     

    Let me know if this works...

     

    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful as can help others.

    LinkedIn: https://www.linkedin.com/in/charlie-phipps-%F0%9F%91%A8%E2%80%8D%F0%9F%92%BB-91338715b/
    YouTube: https://www.youtube.com/channel/UChmFBGU1YKIU91sNMQ7buGg
    Twitter: https://twitter.com/phipps0218

  • Verified answer
    AuburnMist Profile Picture
    239 on at

    Yup! That's it! 🙂 

  • stingray Profile Picture
    196 on at

    Hi String Interpolation is now available in PowerApps, will help read text joins using dynamic strings from data sources.

    $"Text {Dynamic Content} Text"

    You can also use Office365Users.UserProfileV2() is probably a bit more efficient than Office365Users.SearchUserV2() which is more for use in a people picker combobox.

    Thanks

  • Rahul_Tantia Profile Picture
    22 on at

    You can simply add a database connection to Office365Ussers

    Then in the Text Column write Office365Users.MyProfile().DisplayName

  • MWibisono Profile Picture
    75 on at

    String or other functions?

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard