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 / Named Formulas Issue: ...
Power Apps
Unanswered

Named Formulas Issue: Update cached value when dependent variables change

(0) ShareShare
ReportReport
Posted on by 51

When I run my app in the Power Apps preview player, the cached values from named formulas aren't updated when a variable changes on which the formula depends.

I have the following Named Formula in App.Formulas:

CurrentItem = If(
 Not(IsBlank(IdVar)) || IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected);
 Coalesce(
 LookUp(
 [@SPList];
 ID = Coalesce(
 IdVar;
 SharePointIntegration.SelectedListItemID
 )
 );
 Defaults([@SPList])
 );
 SharePointIntegration.Selected
);;

 I have a TextInput control with the following formula in .OnChange:

Set(
 IdVar;
 If(
 Not(IsBlank(Self.Text));
 Int(Self.Text);
 Blank()
 )
);;

Then I have a form where the Item property is set to CurrentItem and the DataSource to [@SPList].

 

When you change the text in the TextInput control the form will not be updated to display any item from the data source.

When I run this app as a form from the corresponding SharePoint list then the correct selected item will be shown. So, at least the Named Formula will run once on startup or when it is used the first time.

 

This problem started last week with the Power Apps version 3.23023.

 

I tried some investigation on my own and found out that the dynamic JavaScript which is created for the _onEntityDataChanged event handler (which is called when a global variable is changed by the Set-function) calls runDependentRules, but it does not include the internal name of Named Formula in the argument list, only all the other "normal" references to the IdVar variable.

 

I hope this gives a good hint to speed up the release of a fix for this issue.

Categories:
  • mvkr09552 Profile Picture
    Microsoft Employee on at

    Thanks for reporting the issue, This issue is fixed in 2303.2 could you please try with that version?

  • ShantanuP Profile Picture
    Microsoft Employee on at

    @aboehm , Do you see this issue with version 2303.2?

  • aboehm Profile Picture
    51 on at

    I tried with version 3.23032.12 and the issue is still there.

    I can't find a 2303.2 version in the drop down. Did you mistyped the version?

    Version settingsVersion settings

  • ShantanuP Profile Picture
    Microsoft Employee on at

    Yes, apologies for the mistype. I just tried exact same scenario in below version and it is working for me.

     

    ShantanuP_0-1679663856983.png

     

     

  • aboehm Profile Picture
    51 on at

    I tried it again with the above mentioned version 3.23023.9 and it didn't change anything for me.

    Can it be due to browser caching? I'm using Microsoft Edge Chromium version 110.0.1587.57 (64-Bit).

    I already tried with Ctrl+F5 but still the same issue. It's correctly showing me the new Power Apps version.

    When I look at the generated JavaScript code it's still missing the internal name of the Named Formula.

  • ShantanuP Profile Picture
    Microsoft Employee on at

    The version which I tried is 3.23033.9. Just want to clarify that's the one you tried. The top one in the dropdown that you shared earlier.

     

  • aboehm Profile Picture
    51 on at

    Yes, sorry it was a mistype from me. My last try was with version 3.23033.9, but when I save and reload the Power Apps editor it always silently reverts back to version 3.23032.12 .

    PowerApps-History.png

  • aboehm Profile Picture
    51 on at

    I analyzed the issue a little more and it really looks like a browser caching issue.

    Whatever I try, e.g. hitting Ctrl+F5 or use "Disable Cache" checkbox from network tab in DevTools, I always see the wrong generated JavaScript as the event handler of _onEntityDataChanged in DevTools Debugger:

     

    fn=function(bc){_re4(bc,"12.OnSuccess","435.Default","449.Text");}

     

    But when I look at the network tab and search for the AJAX request which gets the JSON data which is used to generate this event handler, then I can see the correct JavaScript code:

     

    {
     "code": "function(bc){_re4(bc,\"12.OnSuccess\",\"435.Default\",\"449.Text\",\"NV-4596d290-b511-4880-a31a-ee1d49c94cfc.CurrentItem\");}",
     "constantValue": "",
     "dependency": "1.IdVar",
     "qualifiedPropertyName": ""
     }

     

    The problem is, that this JSON data will never be used to regenerate the cached JavaScript for the event handler.

    The Power Apps version updated itself to version 3.23033.15:

    VersionVersion

    Is there any way to clear this part of browser cache without purging the whole browser user data? I don't use this machine explicitly for Power Apps development, I really need to keep the other data for daily work.

  • ShantanuP Profile Picture
    Microsoft Employee on at

    @aboehm , Does this app work fine on other machine? Did you try in browser incognito mode on the same machine? Also it would be good to try in published app if you see the issue.

  • aboehm Profile Picture
    51 on at

    Thank you for this hint. It works on another machine and in browser incognito mode on the problem machine.

    It also works in the published app in normal browser mode on the problem machine. It only doesn't work in Power Apps preview player when it's not running in browser incognito mode.

    So it definitely has something to do how Power Apps editor is caching this dynamically created JavaScript in Edge.

    I tried to close Edge and reboot the machine, but to no avail. So I tried nearly everything besides reinstalling Edge to clear this script cache and this can't be the solution.

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 234 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard