When defining a formula in the business rules editor, we can only use two entity fields:
So, what are we supposed to do when we have, for example, four fields to sum up (other than creating a calculated field or adding a javascript/workflow/plugin)?
Turns out, we can simply add multiple actions to the business rule so that every action will add one additional value to the sum field(and the first action will copy value from the first value field):
We also have to remember to add all those value fields to the condition just to make sure the business rule kicks in on all field changes:
And, once we have that, here is the end result:
It works.. Although, I guess it may still be easier to use javascript for this
Tried the above workaround, but I got an error saying “You can’t create this rule because it contains a cyclical reference. Fix the rule and try again.”
Change the scope to forms and then it works. If the scope is entity then it throws an error.
How come this works?
Do you have any papers/articles explaining this?
Thanks