Through the PowerApps community, we came over several requests to search several columns in PowerApps with a single search query. In the example below, we are searching for Title and Description using a single search control.
Simply said, it is possible to search by numerous columns, as seen below.
Search(DataSource,TextSearchBox.Text,”Column1″,”Column2″)
BUT, as seen below, this blog searches a different column with a different keyword.
Test it.
- Display a gallery on the screen.
- Add a Search text control (Name : TextSearchBox)
Solution
- Search by + Search term using Start With to narrow down the results.
- To prevent delegation, use With Statement.
- Set the gallery’s Items property to
With( {item: [@IssueTracker]}, Filter( item, StartsWith( Title, Last( FirstN( Split( TextSearchBox.Text, “+” ).Result, 1 ).Result ).Result ) || StartsWith( ‘Issue description’, Last( FirstN( Split( TextSearchBox.Text, “+” ).Result, 2 ).Result ).Result ) ) )
Property of Gallery Items (Screenshot) for easier referencing
the end result (Power keyword search the Title column and Support keyword search the Description Column)
Conclusion
We may search data sources in PowerApps utilising several columns with a single search box and various keywords.