Add or Substract using more than two field inside a formula in Dynamics 365 Business Rules

Follow my blog for more interesting topics on Dynamics 365, Portals and Power Platform. For training and consulting, write to us at info@xrmforyou.com

This one is one of the simplest requirement as it gets and yet you may stumble upon it. Reading the subject of this blog you may wonder, come on business rule have this feature. You can create a formula with more than couple of fields. Unfortunately the answer is No. The UI does not allow you to use more than couple of fields. So let’s see a very simple requirement here.

I have a field called Credit Limit on Contact Entity. The field should be the sum of three fields – Input Credit 1, Input Credit 2 and Input Credit 3

image

Kind of no brainer and the easiest you can get. You don’t want to use script. So you go with Business rules. Right choice!

So I start create a business rule and then use the Set Field value action only to find the UI have can accomodate only couple of fields in the formula.

image

Trust sometimes I wonder, with all the advancements in Power Platform, the platform lacks the feature to handle the simplest of things. Nonetheless it’s not a showstopper.

I guess you already found the solution by now. All you need to use the Set Field value action one more time. So basically the formula goes like this.

Credit Limit = Input Credit 1 + Input Credit 2

Credit Limit = Credit Limit + Input Credit 3

image

And voila! It works. You can actually use this technique for other operations as well like subtraction, multiplication, division etc. Also make sure all the fields involved in the calculation are in the condition.

That’s cheeky I guess. Hope this helps!

Debajit Dutta

(Business Solutions MVP)

Leave a Reply