Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

UpdateContext issue the second run with OnChange Reset

I have a table stored in a collection.

In a input text field I write a serial number. When the text field OnChange is executed, it will look in the collection and save the value in a variable and reset the text field. But this only works the first time when the page is loaded.


After the first execution, I believe that it doesn't have sufficient time to write the result in the variable.


Why is it that the first time it works and then it doesn't? How can I bypass this (I wouldn't like to use a timer - is used in a gallery)?



Super User II
Super User II

Hi @CPalaloga 

Could you please submit a screenshot that illustrates where in your app the problem is occurring.  

Frequent Visitor

This are the main elements:


User click on the part scan:


  • UpdateContext({PendingPart:true});


This will place a mask (PendingPart) over the input text (for users to not see the part number). This is meant to be used only for scan process, no manual input of numbers.


Users use a special code scanner and adds the code in the field. Once the code is added, the OnChange is executed:

  • UpdateContext({AuxVariable:First(Filter(SerialNumber,SN=Self.Text)).PartName});
    UpdateContext({InputReset:true});    //InputReset is added to the text input field


The first time, when the screen is loaded, it works without any issues. If the change is not changed and a new or the same part is scanned, it will not work.

Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,981)