Replies: 1 comment
-
@MikeStall - I like this insider bits. Keep them coming. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Power Fx as formula columns in dataverse is now in preview!.
Boost maker productivity inside Dataverse using formula columns!
The SQL backend
This uses the same front end for parsing and binding (PowerFx.Core), but introduces a new backend that compiles Power Fx directly to SQL.
The front-end will lex to tokens, parse to an AST, binds, and produce an "Execution Tree" (https://github.com/microsoft/Power-Fx/blob/main/src/libraries/Microsoft.PowerFx.Core/IR/Nodes/IntermediateNode.cs )
The C# interpreter (RecalcEngine) traverses the execution tree and interprets it directly. (https://github.com/microsoft/Power-Fx/blob/main/src/libraries/Microsoft.PowerFx.Interpreter/EvalVisitor.cs)
Whereas the SQL backend traverses the execution tree, compiles to SQL and hands it off to Dataverse so it can execute directly as part of the table. This means there are a set of limitations - certain expressions just don't translate to SQL well, but it works great for a wide range of arithmetic, string, date, conditional, and logical expressions.
Timezones
Whereas PowerApps runs a client side app and hence in the user's local timezone, Dataverse runs server-side in the utc. So Now()/Today() would be potentially confusing in a dataverse column, we blocked those funcions and steered towards the new UtcNow() / UtcToday() to be more explicit.
Beta Was this translation helpful? Give feedback.
All reactions