MoreBeerMorePower

Power Platform中心だけど、ノーコード/ローコード系を書いてます。

Named Formulas in Power Apps

Named formulas, one of the featured Updates in 2022 Release wave 2, is finally available.

docs.microsoft.com

The feature requires that Power Apps authoring version is greater than 3.22091.8, and currently it is experimental feature.

Named formulas behave like global variables or collections, but since they define the formula itself, they reflect changes in the data used in the formula in real time.

As written in release plan docs, if user define formula myFormula = Last(Accounts);, myFormula always referencing Last record of Account table, wherever Account table is updated in app.

How to use

To define your formula, go to Formulas property in App object:

For Formulas property, you'll be able to wite myFormula = Last(Accounts); (Semicolon is needed at end of each formula) and myFormula can be referenced from anywhare inside app.

Note

You cannot overwrite definition of formula, for example, Set(myFormula, xxxx) will not update formula definition.

This also means you can set protect/reserve some "variables" using Named formula, since it will not be updated in anyway.

"magicnumber" will be protected.

Tha's all!