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 / Help needed when the f...
Power Apps
Unanswered

Help needed when the filtering out the Gallery control after using the button control

(0) ShareShare
ReportReport
Posted on by 11

Adding this to a new post in the general discussion page as i can't reply in the 'Ask Microsoft anything event

 

I'm currently creating a lead generation app, which will provide accessibility to the sales team in my organisation to submit leads for instrument orders. The team that I'm building this for used to use excel and asked the sales team to fill out an excel form. 

 

With the help of the case management app, i have pretty much used quite a lot of the aspects within that template. I am having a problem when the filtering out the Gallery control after using the button control on the 'home' screen. To explain a little further, the button control is using an OnSelect statement containing: ClearCollect(CustomFilter,{type:"Status",id:0,value:"All"},{type:"email_address",id:0,value:"User().email"});Navigate('Lead List View',Fade).

 

I have a small feeling that is wrong as it's not pointing directly to the gallery. The Items section in the gallery is set to the entity name of where my information is stored (screenshot below)

LeadListView.jpg

 

Any help is much appreciated Smiley Very Happy.

 

Jamie

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

    Hi @stephej,

     

    I noticed that you use a ClearCollect to delete all the records from the CustomFilter collection and then adds a different set of records to the same collection. But you then didn't use this collection but your own entity in the gallery. 

     

    May I know why you create the collection if you do not use it later?

     

    For your reference about clearcollect function:

    https://docs.microsoft.com/en-us/powerapps/functions/function-clear-collect-clearcollect

     

    Capture.PNG

     

    Regards,

    Mona

  • stephej Profile Picture
    11 on at

    Hi Mona,

     

    So the only reason i was using a 'ClearCollect' is that i am pretty much following how the case management app was built without the filter. 

     

    On my first screen i have all 5 buttons, which once clicked will show different things like All leads, Active Leads, Closed leads etc. Once clicked, i want the gallery to filter out to only show the say active leads and to only show the leads generated by the person using the app (which i think is the user().full name function).View all leads screenshot.jpg

     

    Obviously i don't have a 'CustomFilter' collection but then again, I'm not that sure on how to put what I've built in my gallery as a 'collection' or is there another way to get the gallery to filter once each of the buttons is selected? For example, UpdateContext?

     

    Any helpful tips is very much appreciated as I'm at a loose end with this one 🙂

     

    Thanks,

    Jamie

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

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard