Feedback / Example of PowerFx usage to generate computed columns #223
Felx-B
started this conversation in
Show and tell
Replies: 1 comment 8 replies
-
This is great! The scenario makes a lot of sense and the screen recording is great. A few comments... [1] "parse powerfx formula to extract used field" - We do expose top-level identifiers, but I see from the other issue that you need one level deeper. We'll need to add support for that. [2] We're doing more display name support to aide in localization. The idea is that you'd store in an invariant format, and then the formula bar control would translate to displaynames on-demand. [3] We would like to release a PowerFx-2-sql translator. Stay tuned... |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi !
Here at Divalto we build a platform to provide products such as CRM and ERP.
We aim to let user extend our products through advanced settings, and low code capabilities. So I started to explore PowerFx to evaluate how it can help us.
Now I have a functional scenario I want to share, to illustrate PowerFx capabilities and to give some feedback on the integration.
Scenario / Gif
In this example we let user create computed fields, and display them on among other data in the grid
DateDiff(ThisItem.'Start date', ThisItem.'End date', TimeUnit.Minutes)/60 & " h"
How it is made
Stack :
In this view, user choose which column to display, so we build dynamicly the SQL query to populate grid columns.
With computed columns, user can choose to build
ThisItem\.(?<field>\'.[^']+\'|\w+);
Conclusion / Thoughs
It is very easy to integrate PowerFx in existing solution, to boost some features with low code !
Translated columns
I think we need a stronger model to store formulas.
For now we use translated column names, to be user friendly, be this come with some issues :
Maybe we need to store raw formula instead of user formula
ThisItem.'My Field Translated'
=>ThisItem.myField
SQL Limitations
For now, computed columns are populated server side, after sql query, so user won't be able to sort / filter on these columns, due to pagination.
Maybe with a "PowerFx => SQL Translator" we would be able to make them sortable/filterable
Depending on the level of complexity of the formula, we would be able to translate them and enable these kind of features to user.
Circular references limitations
For now, only direct columns of the main table are exposed to user, this limits user possibilities. In further work I should add foreign tables but I didn't manage to get it worked. It seems PowerFx can't handle circular references
ex :
ThisItem.Parent.Children
This kind of scenario force me to duplicate entire table definition for each references
That's all for the feedback.
Thank you for this amazing library and thank you for reading 🙂
Beta Was this translation helpful? Give feedback.
All reactions