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 / updateView is not call...
Power Apps
Answered

updateView is not called on every attribute change?

(0) ShareShare
ReportReport
Posted on by 48

Hello- 

I observed a somewhat unexpected behavior. Per documentation: https://docs.microsoft.com/en-us/powerapps/developer/component-framework/reference/control/updateview : 

"This method will be called when any value in the property bag has changed. This includes field values". However, it seems the runtime is throttling/staging calls, and skip some calls within a timewindow. 

I have a PCF bound to a field. In my form script, I have code

var myAttr = formContext.getAttribute('myfield');
myAttr.setValue("1");
myAttr.fireOnChange();
myAttr.setValue("2");
myAttr.fireOnChange();
myAttr.setValue("3");
myAttr.fireOnChange();

Then in my PCF I logged the attribute value inside updateView function. 

I was expecting that I see all three values per control, because the fireOnChange should invoke all registered controls that bounded to the field and call the updateView. 

 

I am only getting the value 3, but not 1 or 2. 

 

That seems suggest the runtime somehow stage the call within a timewindow, and only invoke the last one and cancel previous ones. It's not uncommon to do this for performance reasons, but it does impact how client should write code if it is by design. 

 

Anyone from PCF team can comment on that?

 

Thanks!

 

 

 

I have the same question (0)
  • ScottDurow Profile Picture
    1,039 on at

    Bump!

  • Verified answer
    jolake Profile Picture
    Microsoft Employee on at

    PCF will only call updateView when the backing data layer tells us there is new data for our property bag. Unfortunately, due to batching that occurs for updates of the data layer, if you do several changes like this in rapid succession they will likely end up batched, and thus your control may only get an updateView for some of the calls. This is by design, but you can be confident that whatever value PCF recieves will the most recent value.

  • ScottDurow Profile Picture
    1,039 on at

    Great - I think this is pretty clear and makes total logical sense to me.

  • liun Profile Picture
    48 on at

    @jolake Thank you. It will be nice if the documetation can reflect that as well.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,041

#2
11manish Profile Picture

11manish 676

#3
Valantis Profile Picture

Valantis 655

Last 30 days Overall leaderboard