Example of Validating Item Class Changes with Rules

You can define validation rules that automatically check whether the item class of an item has been changed.

Scenario

End users are able to change the item class for an item. You can use a validation rule to restrict whether such a change is to, or from, a specific item class. Use the Severity value of the rule to warn about the change, reject the change, or require that the change needs an approved change order.

The following tables summarize an example of an item rule set and item rule that:

  • Tests whether the associated item is being changed to the item class TCCHLDVR, and also changed to the item class TCParent.

  • If the test for item class changes evaluates to true, perform the validation specified by the Validation Condition, which is the expression false.

  • If the Validation Condition evaluates to false, then the validation fails, and the action for the Severity is performed, which is Reject

  • Consequently, if the item class is being changed to TCCHLDVR and also changed from TCParent, then the change is rejected by the rule.

Rule Set Field

Value

Business Entity

Item

Rule Set Name

Validate Item Class

Rule Set Type

Validation

Association Type

Item Class

Association Name

TCParent

Rule Field

Value

Name

Validate Source and Target IC

Description

Ensures that items cant' change item class from TCParent to TCCHLDVR.

Severity

Reject

IF Expression

to_item_class("TCCHLDVR") AND from_item_class("TCParent")

Validation Condition

false

User Message

An item class cant' be changed from TCParent to TCCHLDVR.