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.