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 / Gallery Filtering base...
Power Apps
Unanswered

Gallery Filtering based on a collection

(0) ShareShare
ReportReport
Posted on by 61
SortByColumns(Filter('Time Off Requests',Status.Value = "Pending"),"From", Descending)
ClearCollect(myTeam,Office365Users.DirectReportsV2(curUserEmail).value);

how can i use collect function to filter the above formula i want both data source to be used

Categories:
  • mdevaney Profile Picture
    29,993 Moderator on at

    @wass 
    Can you please give an example of what you are attempting to do?  Its not clear to me from your description above what needs to happen here.  More details are necessary.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • wass Profile Picture
    61 on at

    i retrieved all direct report related to the logged in users into a collection,

    and when the user log in to approve leave request he can only see hi direct report users

    i managed to do it with this function

    SortByColumns(Filter('TimeOffRequests',Status.Value="Pending",'CreatedBy'.DisplayName=
    LookUp(myTeam,'Created By'.DisplayName=displayName).displayName),"From",Descending)

    it works but it gives me a delegation error @mdevaney 

  • mdevaney Profile Picture
    29,993 Moderator on at

    @wass 
    Please post a screenshot showing where the error is occurring.  This is the most straightforward information I would need to help.

    Also, is your list planned to go over 2,000 items?  If no, you can safely ignore delegation warnings.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • wass Profile Picture
    61 on at

    no its very limited even it won't surpass 100 users but i need help with another issue,

    do you know how do we retrieve all available users manager ?

    i made those to formula but its not working as it should

    ClearCollect(alluser,Office365Users.SearchUser({searchTerm:""}).Mail);
    ForAll(alluser,Collect(colManager,Office365Users.ManagerV2(Mail)));

    @mdevaney 

  • mdevaney Profile Picture
    29,993 Moderator on at

    @wass 

    Sorry, but I would like to help with your original issue.  If you'd like help with another issue I suggest you start a new thread.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "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

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

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard