Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Help with Gallery displaying SharePoint displayname field

(0) ShareShare
ReportReport
Posted on by 13

Due to some settings I have no control over, the SharePoint display name in my org is configured as ''Surname, FirstName (Department name)'

I would really like to just display 'FirstName Surname' for the items in my PowerApps gallery. I have looked around and found @tscott07 entry on this post, but that has only got me to the point where I am now able to display 'FirstName (Department name) Surname'. I need some help to enhance this further and remove '(Department name) please.

  • The1AndOnlyPJ Profile Picture
    13 on at
    Re: Help with Gallery displaying SharePoint displayname field

    @WarrenBelz That has worked a dream. Many thanks. I think I understand what is going on with this solution, just would never have got there myself!

  • Verified answer
    WarrenBelz Profile Picture
    146,618 Most Valuable Professional on at
    Re: Help with Gallery displaying SharePoint displayname field

    Hi @The1AndOnlyPJ ,

    This should work - it will help you to take a moment to understand what this is doing

    With(
     {
     wName: 
     First(
     Split(
     YourTextField,
     " ("
     )
     ).Result
     },
     Last(
     Split(
     wName,
     ", "
     )
     ).Result & 
     " " & 
     First(
     Split(
     wName,
     ", "
     )
     ).Result
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • The1AndOnlyPJ Profile Picture
    13 on at
    Re: Help with Gallery displaying SharePoint displayname field

    Many thanks @WarrenBelz , this has given me 'Surname, FirstName' which is a step closer, but I was hoping to be able to display 'FirstName Surname'. Is this possible?

  • WarrenBelz Profile Picture
    146,618 Most Valuable Professional on at
    Re: Help with Gallery displaying SharePoint displayname field

    Hi @The1AndOnlyPJ ,

    Are these separate fields or a string

    Surname, FirstName (Department name)

    If a string

    First(
     Split(
     YourNameField,
     " ("
     )
    ).Result

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,618 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,962 Most Valuable Professional

Leaderboard