Skip to content

Commit

Permalink
Merge pull request #2408 from ronaldwalcott/patch-3
Browse files Browse the repository at this point in the history
Update object-app.md
  • Loading branch information
mduelae committed Jan 29, 2024
2 parents 87e72d4 + 5352d56 commit 97c1aa9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion power-platform/power-fx/reference/object-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ The advantages of using named formulas include:
- **The formula's value is always available.** There's no timing dependency, no **OnStart** that must run first before the value is set, no time in which the formula's value is incorrect. Named formulas can refer to each other in any order, so long as they don't create a circular reference. They can be calculated in parallel.
- **The formula's value is always up to date.** The formula can perform a calculation that is dependent on control properties or database records, and as they change, the formula's value automatically updates. You don't need to manually update the value as you do with a variable. And formulas only recalculate when needed.
- **The formula's definition is immutable.** The definition in **Formulas** is the single source of truth and the value can't be changed somewhere else in the app. With variables, it's possible that some code unexpectedly changes a value, but this isn't possible with named formulas.
- **The formula's calculation can be deferred.** Because it's value it immutable, it can always be calculated when needed, which means it need not be calculated until it's needed. Formula values that aren't used until **screen2** of an app is displayed need not be calculated until **screen2** is visible. This can improve app load time. Named formulas are declarative and provide opportunities for the system to optimize how and when they're computed.
- **The formula's calculation can be deferred.** Because it's value is immutable, it can always be calculated when needed, which means it need not be calculated until it's needed. Formula values that aren't used until **screen2** of an app is displayed need not be calculated until **screen2** is visible. This can improve app load time. Named formulas are declarative and provide opportunities for the system to optimize how and when they're computed.
- **Named formulas is an Excel concept.** Power Fx uses Excel concepts where possible since so many people know Excel well. Named formulas are the equivalent of named cells and named formulas in Excel, managed with the Name Manager. They recalculate automatically like a spreadsheet, just like control properties do.

Named formulas are defined, one after another in the **Formulas** property, each ending with a semi-colon. The type of the formula is inferred from the types of the expression, which is based on the types of the elements within the expression and how they're used together. For example, these named formulas retrieve useful information about the current user from Dataverse:
Expand Down

0 comments on commit 97c1aa9

Please sign in to comment.