PowerFields - powerful calculated fields from Studio

So… the Twig templates I use for PowerReplacer (email templates and campaigns) are so cool and powerful that I see uses for them all over SuiteCRM.

I’m thinking of spinning-off the calculated fields functionality I had mentioned in that add-on to a separate add-on called PowerFields (coming soon).

It’s basically working… like this:

Define your Twig formulas in Studio:

The first formula gets applied to newly created records, the second on edits (both Edit view and inline edits). You can access the currently typed text in the formula, so you can use it to transform what was entered.

Then you just type something in the field:

2020-10-05_152814

… and it gets immediately processed by your calculated field formula, storing the results:

2020-10-05_152837

You can do basically everything; and it’s extensible.

2 Likes

I’ve just been browsing the web to have a look at how SugarCRM and SalesForce do formulas and calculated fields these days, and unless I am very wrong (I admit to being biased on this one :stuck_out_tongue: ) these Twig-based fields can be so much more powerful, extensible and elegant.

We have filters, inheritance, includes, blocks, extensibility, sandboxed security, …

@prg this can be used as a time tracking for the Case module?

What exactly do you mean?

You can, for example, add a timestamp to the description every time a certain field changes. And you can do some calculations on those times.

Yes correct. To track the time spent working in a CASE.

You need a way to trigger the beginning and end of when the time is counted - were you thinking of making that a manual gesture, or automatic (might be difficult…)?

PowerFields will let you do things on fields, when they are created or edited. PowerWorkflows will let you do things when a button is pressed in a view. I also see a possibility to use the tracker table which will record when users enter each view, which might be valuable information for the start of the timer.

With these elements, and a bit of extra PHP code to glue it all together, you might be able to achieve something: an approximate, not entirely accurate, timing.

I just made a separate page in my site to describe the new PowerFields add-on, which is now a separate spin-off from the PowerReplacer add-on.