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 / OnChange Combobox trig...
Power Apps
Unanswered

OnChange Combobox triggering many times

(0) ShareShare
ReportReport
Posted on by 216

Hi all,

I have this in onChange of a combobox . Thie combobox (DataCardValue28) has two choices,  "Open" & "Closed". I want the OnChange fire only if value is changed to "Closed".  It works well but it fires even if user changes value to "OPEN". 

 

If(DataCardValue28.Selected.Value = "Closed", Office365Outlook.SendEmailV2("myname@myserver.com", "your subject", "message in the body"))

 

Any way if I can restrict it to fire only once if user changes value to "Closed" 

Please help

Thanks

Categories:
  • TheRobRush Profile Picture
    11,128 Moderator on at

    The following is a combobox with values in the list of item 1 item 2 item 3 and do on. Upon selecting Item 1 the following code will fire in onchange, however selecting different items AFTER item 1 will cancel that out and set the value to item 1 not selected.

     

    If(ComboBoxIncidentCategories.Selected.Value1="Item 1", Set(fireVar,"Item 1 Selected"),Set(fireVar,"Other Item Selected"))

     

    the following change to above code will run it every time a change is made as long as item 1 is selected, regardless if something is chosen after it.

    If(CountRows(Filter(ComboBoxIncidentCategories.SelectedItems,Value1="Item 1"))=1, Set(fireVar,"Item 1 Selected"),Set(fireVar,"Other Item Selected"))

     

     

    Both have their uses, so adapt the one you prefer

  • K369 Profile Picture
    216 on at

    Hello TheRobRush,

    Apologies for a late reply, as I was trying my best, but no success yet. Your solution may be correct but I think I am making a mistake. Here I reproduced the code:

    If(DataCardValue28.Selected.Value ="Closed", Set(fireVar,"Closed"),Office365Outlook.SendEmailV2("myname@myserver.com", "your subject3", "message in the body3"))

    Here its firing 3 to 4 times...... Any help please?

    Regs

  • K369 Profile Picture
    216 on at

    Hello all, Any help please  ???

    Thanks 

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard