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 / Changing Display Form ...
Power Apps
Answered

Changing Display Form of User().Name

(0) ShareShare
ReportReport
Posted on by
I made an App for my Project Managers through which they can actualize their Projects.

In the first Screen they now see all active Projects while I'd like them to only see the one they are managing.

In order to achieve this I inserted a Search function in the Gallery Item Propriety whcih works if one inserts his name manuelly in the Search Bar I made.

I'd like the App to automatically show the right Projects by matching the User().Name with the Names in the Managers Column of my Database. The Problem i encountered is that the Names in my Database are stored as Initial First Name. Last Name (Ex. J. Smith).

How might I transform the name which I get from User().Name in this form?

 

 

Thank you very much.

Categories:
I have the same question (0)
  • anibra Profile Picture
    278 on at

    Hi @Anonymous ,

    to get the initials of the name (J.) -> Concatenate(Left(Left(User().FullName,Find(" ",User().FullName)),1),".")

    to get last name-> Right(User().FullName,Find(" ",User().FullName))

    to get the name in format J. Smith) -> Concatenate(Concatenate(Left(Left(User().FullName,Find(" ",User().FullName)),1),". "),Right(User().FullName,Find(" ",User().FullName)))

  • Community Power Platform Member Profile Picture
    on at

    Hi @anibra 

    Thank you very much this does in fact goes in the right direction.

    Somehow it does not give the full last name but just a part of it.

    Ex. Muster Mustermann becomes M. ermann

  • v-bofeng-msft Profile Picture
    on at

    Hi @Anonymous ,

     

    Please try:

     

    1\Add an office365Users connection

    vbofengmsft_0-1655112871386.png

    2\Try this formula:

    With({TheRecord:Office365Users.MyProfileV2()},TheRecord.givenName & " " & TheRecord.surname)

    or

    With({TheRecord:Office365Users.MyProfileV2()},TheRecord.surname & " " & TheRecord.givenName)

     

    Best Regards,

    Bof

     

  • Community Power Platform Member Profile Picture
    on at

    Dear @v-bofeng-msft 

     

    Thank you for your Answer.

     

    This way though gives the name of the user but not in the format I'd need it to be.

     

    The Name is given as Bill Example will I need it as B. Example.

     

    Thank you

     

    Best Regards,

    TMue

  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    For whomever might have the same issue

     

    Concatenate(Left(User().FullName; 1); "."; " "; With({TheRecord: 'Office365-Benutzer'.MyProfileV2()}; TheRecord.surname))

     

    This gives the name in the needed format. 

     

    I use the german version so u'll have to subsititute ; for ; and change the name of the Office connector

     

     

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard