Re: Using a button to filter a gallery
Hi @Station1901,
Do you want to filter your Gallery items based on an output of a label when you click a button?
I have made a test on my side, please take a try with the following workaround:
Set the OnVisible property of the first screen of your app to following:
ClearCollect(RecordsCollection, 'YourDataSource')
or
ClearCollect(RecordsCollection, 'The formula you typed within the Items property of your Gallery control') /* <-- Save your Original Gallery items into a Collection */
Set the Items property of your Gallery control to following:
RecordsCollection
Set the OnSelect property of the Button control (that you clicked) to following formula:
ClearCollect(
RecordsCollection,
Filter(RecordsCollection,FilteredColumn=Label1.Text)
)
Note: The FilteredColumn represents the column in your data source, which you want to filter your Gallery items based on. The Label1 represents the Label control that you mentioned.
More details about the Filter function in PowerApps, please check the following article:
Filter function
Best regards,
Kris