Power App - Eval Function
In this article going to show how to execute an Eval function similar JavaScript. Power Apps does not have a EVAL function or something similar in order to evaluate mathematical expressions..
What is EVAL funtion?
The eval()
method evaluates or executes an argument.
If the argument is an expression, eval()
evaluates the expression. If the argument is one or more JavaScript statements, eval()
executes the statements.
PCFX
This functionality is implemented using a custom control.
We need download the managed solution , import into Power App Environment and use the control in a Canvas App.
Review the section "Install package" from this post.
How to use it?
The control has three properties
Formula: The expresion to evaluate
Decimal places: Number of decimals to use.
Style: CSS to apply
Also the control has the "Formula Result" property that we can use in other controls.