PowerApps – enhance Combo Box search functionality

0

Even out of the box PowerApps is a great tool that provides lots of functionality. Way more than InfoPath could. However, most of the time with very few adjustments it is possible to achieve even more. A great example would be a Combo Box and its search ability.

Let’s create a SharePoint list with a Choice column and these values:

It doesn’t really have to be a Choice column, you might as well use a Lookup column.

When a PowerApps form is created, the studio creates a Data Card and a Combo Box control associated with that Choice field.

Let’s see how the search in that Combo Box works and why it is limited in its current state. Note how it finds BK but doesn’t find Black. The search has a StartsWith behavior.

What if it is necessary to search for a word regardless of its position. Well, that’s very easy to adjust. All you need to do is unlock the very Data Card, go to Combo Box control, find Items property and change its code to:

Filter(
    Choices(testcolors.TCColors),
    DataCardValue2.SearchText in Value
)

RESULT

0

This Post Has 4 Comments

  1. LIFE SAVER!!! thank you so much. crazy how you can spend so much time trying to figure out something so simple(simple after finding this that is.)

    0
    1. You are welcome, Zach!
      I’m glad my post was helpful!

      0
  2. This is an amazing post, and came at the right time for me. I have been searching for the exact issue from more than a week now, being a beginner with PowerApps.
    Thank you so much 🙂

    0
    1. Hey Abhishek,
      I’m happy it was helpful!
      Stay safe!

      0

Leave a Reply

Close Menu