PowerApps Multiple Column Search with Single Search Text

I came across similar requirements multiple times which is to search multiple columns in PowerApps but with a single search query through the PowerApps community. In this below example we are searching Title and Description using single search control.

Many of you know I spend quite a bit of time on PowerApps Community which leads to some ideas or clues to write some blogs.

Simple we can say that possible to search by multiple columns like below

Search(DataSource,TextSearchBox.Text,”Column1″,”Column2″)

BUT this blog search different column with different keyword like below

Try it out

  • Insert a gallery on the screen
  • Insert a Search text control (Name : TextSearchBox)

Solution

  • Split the search by +
  • Search keyword using StartWith
  • Use With Statement to avoid Delegation

Set the Items property of the gallery 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
)
)
)

Gallery Items Property (Screenshot) for easy reference

Result (Power keyword search the Title column and Support keyword search the Description Column)

Conclusion

In PowerApps, We can search data sources using multiple columns using single search control with different keywords.

 

Leave a Reply

Your email address will not be published.