CategoriesPower AppsPower Platform

Power Apps – Named Formulas

Today , I want to explain a really cool feature, in order to improve performance of your app and make it “code” more tidier.

NB: This is Experimental Feature, as an experimental feature, do not use named formulas in production apps.

We can use App.OnStart to inizializiate variables, load data and do some operations. These actions my be cause slow starting of your application. Sometimes we use , for example hidden button to write “reusable” code.

Now , we can write formulas and reuse it in any part of our application.

Enabled Named Formulas

Firs of all, you must enable experimental feature. Click on “Settings” and enable it:

Enabled named formulas
Enable Named formulas featur

Use it

Now, you should see new property of your app, called “Formulas”. Here you can add your formula!

Use named formulas
Formulas

Here you can add your formulas. For example:

ParamID = Param("ID");
UserEmail = User().Email;

But, of course, you can add more complex formula.

Advantages

Why we should use named formulas? let’s see some advantages:

  • The formula’s value is always available. There is no timing dependency, no event likes App.OnStart should be executed.
  • Formulas can be calculated in parallel.
  • The formula’s value is always up to date.
  • The formula’s definition is immutable. As opposed to variables, the definition in App.Formulas is the only “source of truth” and the value can’t be changed somewhere else in the app.
  • Calculated when needed. Value are calculated when app need it so this can improve app load time.

Considerations

I hope these information can help you! Here link with additional informations.

Contact me for questions! Have a nice day!

My Agile Privacy
This website uses technical and profiling cookies. Clicking on "Accept" authorises all profiling cookies. Clicking on "Refuse" or the X will refuse all profiling cookies. By clicking on "Customise" you can select which profiling cookies to activate.
Warning: some page functionalities could not work due to your privacy choices