cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jhn1
Advocate II
Advocate II

Onchange event often triggers when screen becomes visible (date picker control)

Greetings PowerAppers,

 

I have a date picker control on an edit form in an app I am finishing up.  The form and the data card are in Edit mode.

There are a few formulas in the control's OnChange event to trap for errors and Patch the date change if no error is found.  Often, when I navigate to that screen, the OnChange event is fired immediately - without me even touching the control!  I get a notification that should only be displayed when a user is trying to change the date.  It doesn't happen every time the form becomes visible.  But, often. There is another date picker control on the same form and it is behaving normally.  

This is very puzzling and I am not sure what to do.  Does anyone have any advice for me?

jhn1

10 REPLIES 10
Conax
Helper I
Helper I

I was following a tutorial on YouTube that loads data from a SharePoint list into a gallery. A button is added to the screen to allow user to add new item into the gallery. OnChange event is added to each control in the gallery. If any control in the gallery is changed then save data back to SharePoint.

Then I found that as soon I click the button to add a new item to the gallery, the OnChange event fires immediately for each control....😅😅😅😅😅

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,651)