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 / Filter by current user...
Power Apps
Answered

Filter by current user Gallery

(0) ShareShare
ReportReport
Posted on by 726

I have built an app with SharePoint fields, there is not a user field in the sharepoint list 

I want to be able to filter the gallery view to only show ones submitted by the current user 

 

At the moment there is a FilterTextBox and in the items for galary a filter

Filter('Vehicle Check', FilterTextBox.Text in Title)

allowing the user to seach for their submissions, but i want it to only display their ones and can't seem to get it to work 

 

I've tried a couple of things in the Items gallary 

Filter('Vehicle Check,email = UserEmail) this returns nothing am not sure what i am missing

 

I've also tried this provided in another post 

 

1) On the "OnStart" property of you app, place this expression:
Set(UserEmail, User().Email)
 
2) Now Items need to be modified as:
Filter(DataSourceName,email = UserEmail) 
 
above comes up blank 

 

filter.JPG
Categories:
  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    If you are still setting UserEmail then the filter would look like this:

     

    Filter('Vehicle Check', 'Created By'.Email = UserEmail) 

     

    This will return all the item the current logged in user created in 'Vehicle Check'. People columns in SharePoint aren't delegable, so you will get a warning but if your list is small it won't make a difference. 

     

    By default the data row limit for non-delegable queries is 500 but you can increase that to 2,000 by going into File > App Settings > Advance Settings

  • amyharkus86 Profile Picture
    726 on at

    Thank you for your reply.

    I'm sure its just me for some reason can not get my head around this one!

     

    I've changed the filter for Items on the gallery

    Filter('Vehicle Check', 'Created By'.Email = UserEmail)  and on the App OnStart Set(UserEmail, User().Email)

     No luck Smiley Sad

    Looks to accept the fields populate no data (attached)

     

    Possibly helpfull to provided the fields in my data for the gallary

     

    Body5 ThisItem.'Last Name'

    Subtitle5.'First Name'

    Title6 ThisItem.'Created By'.Email

     

    My SharePoint list is called Vehicle Check and has about 20 fields, incuding 'Created By'

     

    I've not connected it to O365 User but can do if this is a possible solution

     

     

    By current user.JPG
  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    The formula looks correct and blue squiggly line is because of delegation. How large is your list and have you verified that the variable UserEmail has the correct value? You can go to View > Variables in toolbar and see what the current value of the variable is to.

  • amyharkus86 Profile Picture
    726 on at

    My SharePoint list is quite small at the moment about 15 inputs, all for tests really as the app is not yet live.

     

    My UserEmail value is set to No Value

     

    First app i've used this sorta of things so a little over my head at the moment.

     

    The app has a dataconnection to Office365 Users

     

     

     

  • Verified answer
    yanni99 Profile Picture
    70 on at

    Shane Young did a video about this not so long ago. Maybe it will answer your questions.

    (Sorry I cannot seem to be able to tag him).

     

     https://www.youtube.com/watch?v=-VaADTTPYmg&list=PLCGGtLsUjhm2bonhBZuEhZU72QkFjOpc6&index=67&t=0s

  • amyharkus86 Profile Picture
    726 on at

    Thank you, I followed the video and created an additional fieled in my sharepoint list

     

    Onstart up i now have

    set(varUser, User())

     

    on Galleary Item i have

    Filter('Vehicle Check', CreatorEmail = varUser.Email)

     

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard