Business rules can be used to dynamically set value in the field based on any condition. Similarly it can also clear out value from the field depending upon the condition.
Select the entity for which you have to implement the business rule. In our case we are using Account entity. Within the selected entity navigate to the section “Business Rule” and open it and click on New.
Now the business rule template should get opened. Here select the dedicated condition for which you have to set or clear value from the field. In our case, we will clear out value from field “Fax” when field Account Number is empty. And copy the value from Account Number when Account Number is not empty.
Now select the component Set Field Value and drag drop to the IF statement and ELSE statement of the Condition component.
In the IF statement, select the below configuration.
Here, as we kept the data type as “Field” and copied the data from field “Account Number” to “Fax”.
Similarly in ELSE statement, select the below configuration.
As you can see, here we are simply clearing out any value from field fax if the Account Number is empty.
Now validate, save and activate the business rule. Navigate to Account entity, enter any valid value in field Account Number. Now you will see that the value from field Account Number will get copied into field Fax. Later, empty the field Account Number and you will observe that the field Fax will be cleared out.
For more information click on the link.