Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

How do you set up combo boxes so that only one combo box can have a value in it at a time?

(0) ShareShare
ReportReport
Posted on by 821 Super User 2025 Season 1

I have a series of combo boxes that filter a dataset. In many cases having more than one of the combo boxes with a selection will yield no record matches. My thought is that when on of the combo boxes is selected the others could be reset. Problem is if each is looking at the other for a change the Reset is triggered for all of them.

 

Simple Example

ComboBox1 resets ComboBox2 if a selection is made in ComboBox1.

ComboBox2 resets ComboBox1 if a selection is made in ComboBox2 which triggers the OnChange of Combox1 which resets ComboBox2

 

How can I make this work? I think setting a variable might be the answer but not sure how to implement.

Categories:
  • futr_vision Profile Picture
    821 Super User 2025 Season 1 on at
    Re: How do you set up combo boxes so that only one combo box can have a value in it at a time?

    @WarrenBelz ,

     

    I think my issue was using OnChange and not OnSelect. If I update the variable OnChange then it creates a loop and resets the combo box I just changed. I updated the variable without setting it to Blank(). It works.

  • WarrenBelz Profile Picture
    146,524 Most Valuable Professional on at
    Re: How do you set up combo boxes so that only one combo box can have a value in it at a time?

    @futr_vision ,

    Reset is triggered on a change of variable from something that is not the trigger to a value that is. So before each reset, set it to Blank() or any other value.

    UpdateContext({varReset: Blank()});
    UpdateContext({varReset: Reset1})

     

    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

     

  • futr_vision Profile Picture
    821 Super User 2025 Season 1 on at
    Re: How do you set up combo boxes so that only one combo box can have a value in it at a time?

    @WarrenBelz 

    Thanks. I did find that issue and removed it. Looks like your solution works but I run into issues with the reset if I need to account for more than one control. For example, I tried something like this on the Reset of CoboBox1

     

    Or(varReset = "Reset1", varReset = "Reset2")

     

     and

     

    varReset = "Reset1" || varReset = "Reset2"

     

    Neither of these throw and error but neither work. I'm not exactly sure why. I've thrown a label into the app to make sure that the variable was being set with the OnChange event of each control.

  • WarrenBelz Profile Picture
    146,524 Most Valuable Professional on at
    Re: How do you set up combo boxes so that only one combo box can have a value in it at a time?

    Hi @futr_vision ,

    The only reason you would get a compatibility error is if you are using varReset somewhere else  with a different data type. You can call the Variable whatever you want, but the idea of Text variable is that you can change it to different values and when it is changed to the value that the particular control has as its Reset trigger, that control will reset. So OnChange of each control, you can set the Variable to the Reset trigger of the other.

  • futr_vision Profile Picture
    821 Super User 2025 Season 1 on at
    Re: How do you set up combo boxes so that only one combo box can have a value in it at a time?

    Hi @WarrenBelz,

     

    Am I setting that variable at the OnChange property of combo box 2? 

     

    varReset = "Reset1" also gives me an incompatibility error.

     

    How would this work if I need to reset more than one control?

     

    I was thinking that maybe when a value in a control is chose then I can set a variable to a representation of that control. For example if I was working with ComboBox1 then I would set a variable to "ComboBox1". If I made a selection in ComboBox2 then I would change that variable to "ComboBox2". Then there would be some logic on each control that would check that variable and if the value was anything other than the value of the control then the combo box would be set to blank. Does that make sense?

  • Verified answer
    WarrenBelz Profile Picture
    146,524 Most Valuable Professional on at
    Re: How do you set up combo boxes so that only one combo box can have a value in it at a time?

    Hi @futr_vision ,

    Make a text variable on box 2

    UpdateContext({varReset: "Reset1"})

    And the Reset property of box 1

    varReset = "Reset1"

    the do the opposite on the other one using “Reset2”

     

    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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard