Follow

Business Rules - Set field values

This article explains how to create a Business Rule that sets or over-rides field values when an item is added or updated. This can be used to for example set default values for fields without the user having to specify the values explicitly. A specific example may be to automatically set the Actual Progress on a task to 100% if an Actual End Date is specified. This can therefore be used to enforce business logic without using validation rules.

Adding a new business rule

Only the Support Desk can currently configure this type of business rule so please feel free to log a support ticket if you believe that this type of rule would be useful for your use case.

Under the Administration Menu select Business Rules which will take you the Business Rule List page and then click on the Add Business Rule action icon. On the form that is displayed, complete the information as described below:

mceclip0.png

Description: Provide an applicable description for the business rule e.g. "Task: Set Actual Progress to 100% on completion".
The entity this rule relates to: Here you select the entity that the rule relates to e.g. Task.
The events that should trigger the rule: The rule can be triggered when an item is added, updated or both or when an item is deleted.
Is the rule active?: The Active checkbox is by default selected when a new business rule is added.
Action: Select "Set Entity Fields". If you do not see this option in the list, make sure that you are cross-site authenticated on the instance.
Sort Order: Leave this as 1, unless the order in which business rules are evaluated is important.
XSL transformation of event XML: This is the XSL that is used to specify the field values. Data from the event including the old values (for updates), new values (add and update), the related project (if applicable) as well as the user updating the item are available.
Conditions and exceptions: In this section you can specify any conditions or exceptions for when the business rule should be triggered. In the above example it would only include tasks where the Actual End Date is not blank.

mceclip1.png

For more information on how to use Conditions and Exceptions, refer to this article.

Additional notes

Keep in mind that this type of business rule is executed before any other business rule, including validation rules and send e-mail rules.

It should also be noted that this rule does not create a separate history record as it forms part of the update done by the user.

Only fields for the entity that is being added or updated can be set.  You can for example not set field values on the related project using this type of business rule.  For that you should use a Call Web Service business rule.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request
Article is closed for comments.
Start a 30 Day Free TrialClick ClickNo Credit Card and No Obligation
Powered by Zendesk