No need to restrict a Power Apps Gallery search to a single method, multiple search options are possible. This approach uses either cascading Dropdown Boxes to refine a search, or if you already know what you are looking for, type the search criteria directly in the Text Input box
Once either search option is selected, it supercedes and resets the other search option and is adopted by the Gallery control to filter it’s contents
Multiple Search Options
The same data on Countries from the previous post Power Apps Dropdown Boxes, is used in the demo below
Cascading Dropdowns
The AllowEmptySection property is set to true so both Dropdown boxes are blank when reset. The first Dropdown Box gets the data from the Continent column, extracts just the distinct fields and sorts them alphabetically
The second Dropdown box cannot be used until the first Dropdown box has a value. Whether the first Dropdown has a value is determined by the Len (length) function and unless the value is greater than zero the Dropdown box is disabled. IsBlank can be used instead of Len. Once the first Dropdown box has a value, the second Dropdown takes the selection from the first Dropdown and uses it to present just those countries that are in the specified Continent
Additionally, when the first Dropdown box is selected the Text Input box is reset and when the Text Input box is selected both the Dropdowns are reset. This is done via the OnSelect property of each
Gallery
The Gallery employs the nested If statements below for it’s Items property. We already know that due to the resets, only the Dropdowns or the Text Input box can have a value at any one time
If the Text Input box contains a value, then this is used for the Gallery. If only the first Dropdown has a value then this is used for the Gallery instead. Finally, if the second Dropdown has a value, then a particular country has been selected and this is used to present a single record in the Gallery