web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : Re9JVCuJKvkSmLIfPneqEO
Power Apps - Building Power Apps
Unanswered

Using allow searching on combo boxes

Like (0) ShareShare
ReportReport
Posted on 22 Apr 2023 10:16:47 by 225

Morning all

 

I've created an app where I've used combo boxes with choices and to avoid having to scroll down on a long list of choices, I've also enabled 'allow searching' on each combo box (note that I have not enabled multi selection as I don't want it).

 

However, if I search for something and click off the combo box, it allows the searched text to stay there.  I realise that it won't allow the searched text to be patched and will need a correct value to be selected, but it looks better if it goes back to showing the original 'Select...' prompt from the InputTextPlaceholder if nothing has been selected.

 

An extreme example below but look:

 

Automate2create_0-1682158109301.png

 

I would have thought that by default when you stop searching and click off the combo box, the InputTextPlaceholder would show again (I have been filling mine with 'Select...').  Do I actually have to write some code for the InputTextPlaceholder to show again and apply it to each combox box - this doesn't seem right - or is there a setting somewhere that I haven't seen or have turned off?  Trying to do this the right way!  Thanks 🙂

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    149,427 Most Valuable Professional on 25 Apr 2023 at 04:47:29
    Re: Using allow searching on combo boxes

    @Automate2create ,

    Yes, but the button using the code would reset all combo boxes - there is no such thing as "invalid" SearchText

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Chocolate_Pizza Profile Picture
    225 on 24 Apr 2023 at 12:28:20
    Re: Using allow searching on combo boxes

    Ah I see!  So if I click off the combo box and I have been typing to search in there, the search text will stay in the box and there is no way round that particular problem?

     

    I have a second idea where all the combo boxes can display search text but then if I create a button called 'reset', it could reset any combo boxes that didn't have a valid selection.  Would it be worth me looking into that idea?  (and if you could confirm the above, that would  be really helpful).  Thanks for your help so far 🙂

  • WarrenBelz Profile Picture
    149,427 Most Valuable Professional on 24 Apr 2023 at 10:59:12
    Re: Using allow searching on combo boxes

    @Automate2create ,

    Clicking off  them will not reset them - OnVisible only triggers when the screen is first opened. That code needs to be run each time you need to clear the combo boxes - and it will do so inside a Form.

  • Chocolate_Pizza Profile Picture
    225 on 24 Apr 2023 at 10:26:47
    Re: Using allow searching on combo boxes

    Note that, these combo boxes are inside a form.  I wondered if this was the problem so I created a combo box outside of the form and applied the varReset to the Reset property but this also doesn't work.

  • Chocolate_Pizza Profile Picture
    225 on 24 Apr 2023 at 09:47:15
    Re: Using allow searching on combo boxes

    I'm afraid it's not working.  Here are some screenshots to check I have it set correctly.

     

    I have the screen OnVisible set as below (has other variables also):

     

    Automate2create_0-1682327731344.png

     

    And then I have varReset on the Reset property of all my combo boxes. 

     

    Automate2create_2-1682329014495.png

    I have exited editing the app and played it, fill the combo boxes with text and then click off them, but it keeps them filled with search text. 

     

     

     

     

     

  • WarrenBelz Profile Picture
    149,427 Most Valuable Professional on 24 Apr 2023 at 09:01:36
    Re: Using allow searching on combo boxes

    @Automate2create ,

    The Reset property of each Combo Box needs to be varReset. The code posted needs to be run whenever you want to reset the Combo Boxes.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Chocolate_Pizza Profile Picture
    225 on 24 Apr 2023 at 08:53:41
    Re: Using allow searching on combo boxes

    Hi Warren

     

    Thanks so much for replying, I'm only half understanding.  I know that UpdateContext is for local variables, so I would need to put:

     

    UpdateContext({varReset: false});
    UpdateContext({varReset: true});

    on the screen OnVisible property?  After that though, I'm not sure what I need to apply to the individual combo boxes.  I want it so that when I click off of a combo box, it will clear the search and set it back to blank (with my InputTextPlaceholder which says 'Select...'). I am not sure what syntax I should put in the 'Reset' property of each combo box, is that what I should be doing?  

  • WarrenBelz Profile Picture
    149,427 Most Valuable Professional on 22 Apr 2023 at 21:17:39
    Re: Using allow searching on combo boxes

    Hi @Automate2create ,

    No you have not done anything wrong - if you select something from the SearchText result, it will replace the text, but if you are using the Combo Box SearchText as a simple search tool, the value will stay there until you Reset the Combo Box. You can do them all at once - make their Reset a Variable (varReset as an example) and then when you want them cleared

    UpdateContext({varReset: false});
    UpdateContext({varReset: true});

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete