Tip #252: Unconditional business rules

From time to time there is a need for a business rule that simply copies value from one field into another unconditionally. For example, with the faxes being slowly but surely on their way out, we might simply want fax field to hold a copy of the main phone number. Well, not really, but let’s assume that for the demo purposes.

Instinct is to write something like that:
Non working business rule
It’s great but, unfortunately, it will only work in form load event and not when the phone number changes. Leaving condition empty means that there is no condition when the action needs to be executed with the exception of unconditional form load event. Adding a condition (any condition, in fact) that includes form fields will wire up the action to onchange event for these fields. For example, in this rule:
Working business rule
action will be triggered when either phone or fax value change.

Leave a Reply

Your email address will not be published. Required fields are marked *