I would like to have a way for the user to be able to define mathematical expressions at runtime.
For example, I would like to have the user be able to type:
1 + 2 * ( 3 + sumOfSales) //sumOfSales is a variable
in a text box, and have it be treated as a formula, and calculate the result.
Text boxes would have a boolean setting to enable or disable the parsing of formulas.
The formula would be available from the .Formula property.
It would borrow from excel, and only interpret the input as a formula if the user starts typing with an equal sign. A literal equal sign can be added by starting with a single quote as well, just like Excel.
It would also be possible to parse text on other fields and display the results, using Calc() and Eval() formulas.
Calc(param) - would take input from its parameter and attempt to parse it as a mathematical formula, allowing for references to other object properties, variables, and the Value() and Text() functions. It would not accept other PowerApps functions however.
Eval(param) - would be the fuller version, which would be able to parse the contents of its parameter as PowerApps code with all features.
It should be possible to enable or disable the availability of the Eval() function on the project settings. The global admins should be able to block users from enabling the Eval() globally or per-user to prevent misuse or abuse.