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 / sort filter view by cu...
Power Apps
Answered

sort filter view by current user for their own records in gallery how to?

(0) ShareShare
ReportReport
Posted on by 1,994

Hi

 

I sort filter my gallery, how can I add to only current user log in to see their own records?  where do I add the createdby in the syntax?  Thank you

 

SortByColumns(
Filter(
list',
(IsBlank(combstatus.Selected.Value) || IsEmpty(combstatus.Selected.Value) || Status.Value = combstatus.Selected.Value)

),"ID",Descending)

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    156,275 Most Valuable Professional on at

    @bbsin ,

    This is not Delegable, but

    SortByColumns(
     Filter(
     list',
     (
     Len(combstatus.Selected.Value)=0 || 
     Status.Value = combstatus.Selected.Value
     ) && 'Created By'.Email = User().Email
     ),
     "ID",
     Descending
    )

    This is Delegable

    With(
     {
     wList:
     Filter(
     Sort(
     List,
     ID,
     Descending
     ),
     Len(combstatus.Selected.Value)=0 || 
     Status.Value = combstatus.Selected.Value
     ) 
     },
     Filter(
     wList,
     'Created By'.Email = User().Email
     )
    )

    providing the top filter returns les than 2,000 records.

     

    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.

  • Verified answer
    Al_10 Profile Picture
    1,691 Super User 2024 Season 1 on at

    SortByColumns(
    Filter(list',
        (IsBlank(combstatus.Selected.Value) || IsEmpty(combstatus.Selected.Value) || Status.Value = combstatus.Selected.Value) && 'Created By'.Email = User().Email
    ),
    "ID",Descending)

     

    Please note: 

    users' email must match their UPN (your Azure admin can confirm that) if you match 'created by' with User().Email. Otherwise use Office365 connector to get current user's email first. 

  • bbsin Profile Picture
    1,994 on at

    Thanks @Alex_10  and @WarrenBelz 

  • bbsin Profile Picture
    1,994 on at

    @WarrenBelz - wList is it the list?

  • WarrenBelz Profile Picture
    156,275 Most Valuable Professional on at

    @bbsin ,

    A temporary Variable - you can call it whatever you want - please have a read of this blog of mine.

  • bbsin Profile Picture
    1,994 on at

    hI @Alex_10 

     

    Question, as owner or admin to the  app , how can I set to view the all the records in the gallery what should I add into the syntax?  Thanks

  • bbsin Profile Picture
    1,994 on at

    Hi @WarrenBelz 

     

    Does that mean that if the records are more than 2000 .. both syntax will not work??

     

    Thanks

     

  • WarrenBelz Profile Picture
    156,275 Most Valuable Professional on at

    @bbsin ,

    The first one will not work over 2,000 records properly. The second one will look at the newest 2,000 records, but will not work completely unless there is a selection in the combo box and this filter selects less than 2,000 records.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 421 Most Valuable Professional

#2
11manish Profile Picture

11manish 153 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 116 Super User 2026 Season 2

Last 30 days Overall leaderboard