I have a large SQL database.
I am using a Gallery and Checkbox so users can select on 1 or Multiple items on the Checkbox to filter the database.
The Checkbox is using a column called, "FilterColumn".
Then the users select a button to Collect the data from the Database.
Let's say the Checkbox is named FILTER
My function on Select in the Button is
Collect(NEWDATABASE, Filter(SQLDATABASE, FILTER.Text in FilterColumn))
When I look at the gallery, only 1 of the selected filters is collected. How can I make it so every selection is being filtered?
Consider changing your formula to the following:
ForAll( Filter(yourGallery.AllItems, yourCheckBox.Value), Collect(NEWDATABASE, LookUp(SQLDATABASE, FilterColumn = FILTER.Text)) )
I hope this is helpful for you.
Doesn't ForAll() just loop the number of items that have been selected in the CheckBox?
My SQL data is large so I have a column in there titled RECORDID, where each line has its own unique number from 1 to 200,000.
The database was filtered by 2000 intervals ( RECORDID < 2000 , 2000<=RECORDID && RECORDID<4000 etc.)
I tried to recreate your solution but because the number of data is large, it doesn't work.
I then tried to add the Filter after the Lookup()
LookUp(Filter('SQLDATABASE', RECORDID < 2000), FILTERCOLUMN = FILTER.Text))
and this doesn't work either.
I don't think I am understanding then what you have in the Gallery and where the checkboxes are.
My impression was that you had a Gallery with items listed, you have users click on items they "want", and then at some point the user clicks a button and you wanted to collect those marked items?
Keep up to date with current events and community announcements in the Power Apps community.
A great place where you can stay up to date with community calls and interact with the speakers.
Check out the latest Community Blog from the community!