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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Popup appearing when n...
Power Apps
Unanswered

Popup appearing when no case is selected from Combobox

(0) ShareShare
ReportReport
Posted on by 44

Hello!

 

I have created a popup that should appear when the user selects something from a Combobox.

My issue is that the popup also appears randomly when there was no change in Combobox, on opening a screen.

 

My Combobox' OnChange property is:

OnChange = Set(varShowPopup, true)

 

Any help will be greatly appreciated.

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,454 Most Valuable Professional on at

    Hi @dbbbb ,

    The issue is that a Combo Box triggers its OnChange event whenever a screen is opened containing the form it is in - the easiest way to see if it is actually changed is to compare its present content with the value in the underlying field so OnChange (assuming a Choice/LookUp column here) and only trigger if they do not match

    If(
     Self.Selected.Value <> ThisItem.YourFieldName.Value,
     DoYourActionHere
    )

     

    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

     

  • dbbbb Profile Picture
    44 on at

    Hi @WarrenBelz, thanks for a prompt reply.

    Should I apply this syntax into the Combobox's OnChange property or elsewhere? Not sure if I got you correctly.

  • slima1 Profile Picture
    69 on at

    It sounds like the issue might be that the OnChange property of the ComboBox is being triggered even when there is no change in its value. This could be happening if the ComboBox is being loaded with a default value that matches its initial value.

    To fix this, you can try using the OnSelect property of the ComboBox instead of OnChange. The OnSelect property is only triggered when the ComboBox is actually selected by the user, and not when it is loaded with a default value.

     

    Here's an example of how you can modify the ComboBox's OnSelect property:

     

    1. Add a variable to the app to keep track of the previous value of the ComboBox:

    Set(varPreviousValue, cmbComboBox.Selected.Value)

    Modify the OnSelect property of the ComboBox to check if the value has changed before setting the varShowPopup variable:

    If(cmbComboBox.Selected.Value <> varPreviousValue, Set(varShowPopup, true))

     

    This code will only set the varShowPopup variable to true if the selected value of the ComboBox is different from the previous value. This should prevent the popup from appearing randomly when there is no change in the ComboBox.

     

     

     

     

     

  • WarrenBelz Profile Picture
    156,454 Most Valuable Professional on at

    Hi @dbbbb ,

    Yes - just add your existing code where I have DoYourActionHere.

    @slima1 , we appreciate solutions from the experience of users, but ChatGPT is available to everyone and regularly simply confuses the matter with misleading answers

    WarrenBelz_0-1683578880081.png

     

    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

     

     

  • dbbbb Profile Picture
    44 on at

    Hi @WarrenBelz 

     

    The following code does not work (OnChange property of Combobox)

     

    If(
    Self.Selected.Value <> MyComboBox.Value,
    Set(varShowPopup, true)
    )

     

    P.S. My combobox chooses in its Items property Office365Users function if this is of any importance.

  • WarrenBelz Profile Picture
    156,454 Most Valuable Professional on at

    Hi @dbbbb ,

    You need the Field name it is displaying (I assume it is in a Form), not the Combo Box name - you actually just use (with actual field name and assuming this is a Choice or Lookup field)

    Set(
     varShowPopup,
     Self.Selected.Value <> ThisItem.YourFieldName.Value
    )

     

    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

  • dbbbb Profile Picture
    44 on at

    @WarrenBelz in this case the field changes only if the user applies the change by clicking on a button.

     

    What I'm trying to achieve is to display a popup when the user is playing with the combobox (without applying changes and overwriting a field in a SharePoint column)

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard