SetChoice example: Update attribute status

In this example, the SetChoice business rule is used to update the status of an attribute.

The Requirements module contains a Choice attribute named "Status," which contains the items New, Started, Commented, Delayed, Finished, and Not Approved. The same module contains a Text attribute named "Comments," in which users can add comments about the requirement.

With the SetChoice business rule, you can update the Status attribute to "Commented" whenever a comment is added in the Comments attribute.

  1. Note the ID numbers of the Status attribute and the Commented item. In this example, the ID numbers are 308 and 14.
  2. Make sure that the Requirements module contains a Text attribute that is the business rules container attribute. In the business rules container attribute, enter the following business rule:
    =SetChoice("308","14","true",'Comment')

    When a comment is added to a requirement, the SetChoice business rule updates the status to "Commented."


Feedback