cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dipakbadgujar
Frequent Visitor

How to Stop OnChange event of Dropdown List

 

Hi,

I am using the Dropdown list. While Inserting the Record in the sharepoint list(Personal Info form) ,OnChange event of Drop Down list(depends on Text) I am navigating to another form(Experience Details) Where I am Inserting Information and Coming Back to Personal Info Form). Which is working fine.

But when I am editing the form When I have to Navigated to Personal Info Form  I will directly Navigating to Experience Details form.

I think this is happened due to OnChange of the DropDown List.

How to Stop it.

 

This is the Code onChange of DropDown

 varEditMode is variable which will decide Its New Entry of Edit the Entry

If((varEditMode="0") And ((cmbLastWorking.Selected.Value="Currently") Or (cmbLastWorking.Selected.Value="Last Working")),
Navigate(scrExperienceDetails));

If((varEditMode="1") And ((cmbLastWorking.Selected.Value="Currently") Or (cmbLastWorking.Selected.Value="Last Working")),
Navigate(scrExperienceDetails));

DropDown Problem.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @dipakbadgujar ,

Yes, that is one of the quirks (some would say bugs) of Combo Boxes OnChange event firing when a Form is opened. There are a couple of strategies. If for instance you opened the form in View Mode and (obviously) only wanted to fire the event in Edit Mode, you could make the OnChange conditional on being in Edit mode (so it would not fire when the form is opened). Another one (which I have used once) is to make the OnChange also conditional on a Variable being true. Use a Global variable and set it to false before you enter the screen and then have a hidden timer (2-3 seconds will do) setting it to true OnTimerEnd.

 

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.

Visit my blog Practical Power Apps

View solution in original post

1 REPLY 1
WarrenBelz
Super User
Super User

Hi @dipakbadgujar ,

Yes, that is one of the quirks (some would say bugs) of Combo Boxes OnChange event firing when a Form is opened. There are a couple of strategies. If for instance you opened the form in View Mode and (obviously) only wanted to fire the event in Edit Mode, you could make the OnChange conditional on being in Edit mode (so it would not fire when the form is opened). Another one (which I have used once) is to make the OnChange also conditional on a Variable being true. Use a Global variable and set it to false before you enter the screen and then have a hidden timer (2-3 seconds will do) setting it to true OnTimerEnd.

 

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.

Visit my blog Practical Power Apps

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (1,831)