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

Check box selection and show all items in Gallery on re load / reset

Hi All

Ok so learning lots about Power Apps now which is enjoyable! 

I'm learning about filtering a gallery but delegating the responsability of the filter to the control so it's much easier to maintain.

Currently the filter is simple but will grow allot so trying to do the right thing from day one. 

Here is my situation
1. Bring in simple and small SQL table as a collection on start - ResourceData

2. Have a check box that creates a collection which is a filter of my data above

If('Not With Client'.Value = true,
Filter(ResourceData,Status = "Not With Client"),
Filter(ResourceData,Status <> "")))

3. Apply the collection in the items of the gallery so that it filters when pressing or un-pressing the check box

Filter(ResourceData,Status in FindResourceNotWithClient.Status)

4. This works a treat !

Here is my problem
When I load the app the gallery is always blank!
Am I doing something wrong or is there a way to ensure the gallery shows all data when I load the screen ?

Any help will be greatly appreciated Smiley Happy
Many thanks! 

Super User
Super User

Re: Check box selection and show all items in Gallery on re load / reset

Have you tried adding the following to the OnStart property of the app or the OnVisible property of the screen:

ClearCollect(FindResourceNotWithClient, Filter(ResourceData,Status <> "")


This should load your gallery with all the data until someone clicks a checkbox and the collection gets reset.