cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
stephej
Level: Powered On

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

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

2 REPLIES 2
Community Support Team
Community Support Team

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

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

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
stephej
Level: Powered On

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

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

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,914)