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 / DisplayName from Share...
Power Apps
Answered

DisplayName from SharePoint as label in Gallery and Filter Gallery items by current user

(0) ShareShare
ReportReport
Posted on by 257

Hello, 

 

I have a SharePoint list with a person or group column named "Primary Resource Assigned" which accepts multiple values.

 

1) I would like to add a label showing the Primary Resource Assigned on the Gallery.

I tried :

Concat(ThisItem.Primary Resource Assigned.DisplayName,";")

but all I get to display on the label is 

;

 

2) Then I want to add a button that will take me to another screen and show only the items assigned to the current user. 

 

I thought of trying the function below, but it gives me an error saying 'Expected Text Value'

 

Filter('DataSource', VarUser.displayName='Primary Resource Assigned'.DisplayName)

 

 

Can anyone offer some help with these two issues?

 

 

Much appreciated. 

 

 

GalleryHelp.jpgLabelhelp.jpg

Categories:
  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @F_Quint ,

    1. modify the Concat formula as follows:

    Concat(ThisItem.'Primary Resource Assigned', DisplayName&";")

    If you want to remove the extra semicolon on the far right, please try this:

    Left(Concat(ThisItem.'Primary Resource Assigned',DisplayName&";"),Len(Concat(ThisItem.'Primary Resource Assigned',DisplayName&";"))-1)

     

    2. Modify the Filter formula  as follows:

    Filter('DataSource', VarUser.displayName in 'Primary Resource Assigned'.DisplayName)

     

    Hope this helps.

    Sik

  • KrishnaV Profile Picture
    5,023 on at

    Hi @F_Quint ,

     

    I totally agree with @v-siky-msft however at times display name doesn't work as expected so use email instead:

    Filter('DataSource', VarUser.Email in Concat(ThisItem.'Primary Resource Assigned', Email&";"))

    Since you said it is a multi-selection you should concat while you do the Filter as well.

     
    I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

    Regards,
    Krishna
    If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

  • F_Quint Profile Picture
    257 on at

    @v-siky-msft  Sik, 

     

    The first formula worked perfectly for what I needed! Thank you so much. 

     

     

    the second one, however, doesn't show any data on my Gallery.  I'm the primary resource assigned for multiple requests so I'm curious as to why it wouldn't show up.   Any pointers?

     

    Thanks again for your help!

     

    FilterbyOwner.jpg

     

  • KrishnaV Profile Picture
    5,023 on at

    Hi @F_Quint,

     

    Did you try the formula I provided in my reply.

     

    Regards,

    Krishna

  • F_Quint Profile Picture
    257 on at

    @KrishnaV  Hi, yes I tried that but give me an error.  See screenshot below

     

     

     

    ErrorGallery.jpg

  • Verified answer
    KrishnaV Profile Picture
    5,023 on at

    Hi @F_Quint ,

     

    Please change the filter formula as below

     

     

    Filter([@SampleList], User().Email in Concat('Primary Resource Assigned',Email&";"))

     

     

    ThisItem is at the item level we can't use that at gallery level, maybe that is my bad. 


    I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

    Regards,
    Krishna
    If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

  • F_Quint Profile Picture
    257 on at

    @KrishnaV 

     

    Thanks again for your input. I tried your suggestion but Gallery comes in blank.

     

    KrishnaHelp.jpg

  • KrishnaV Profile Picture
    5,023 on at

    Hi @F_Quint,

     

    Ensure that your filter returns the values as well double check on the data.

     

    Regards,

    Krishna

  • KrishnaV Profile Picture
    5,023 on at

    Hi @F_Quint ,

     

    Ensure that your email is intact with User().Email and Office365Users.MyProfileV2().mail some time they both are not same.

     

    I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

    Regards,
    Krishna
    If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

  • nicolasrugolo Profile Picture
    2 on at

    nicolasrugolo_0-1683558556704.png

    Bonjour j'ai essayé votre solution mais ca ne fonctionne pas. Pouvez vous m'aider svp?

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 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard