Data Validation in the Web UI
Within the Web UI, attributes, references, and metadata can return messages through a Data Validation business condition. The condition is useful if certain users are required to make specific additions or changes to an attribute or reference, or when there is a need to prevent users from modifying a specific attribute or reference.
Note: Data Validation in the Web UI will not work properly with lazy loaded tabs. Attempting to use them together results in Mandatory, Read Only and Hidden either showing incorrectly or not showing at all.
Attributes / references marked as read only have their values grayed out, and the user is unable to edit the field. Attributes / references marked as mandatory have fields that turn red if the user clicks out of the field without adding a value, and the user is unable to save until a value is added. Those marked as hidden do not display in the Web UI to users.
Prerequisites
Administrative users should be familiar with how the Evaluate JavaScript business condition operates, as described in the Business Condition: Evaluate JavaScript topic in the Business Rules documentation here.
Configuring Conditional Data Validity
To configure an attribute or reference with conditional data validity, follow the steps below:
-
In System Setup, navigate to the Global Business Rules node and create a new business condition. In this example, the business condition is called, 'Conditional Validity.'
-
Right-click the business condition just created and select Edit Business Rule which opens up the Business Rule Editor.
-
In the Business Rule Editor, click Add New Business Condition. Then, in the Edit Operation dialog, from the dropdown, select 'Evaluate JavaScript.'
-
Click the Edit Binds button (), and add one or more of the following bind(s): Data Issues Report, Hidden, Mandatory, and Read Only.
-
Select and tie any other binds you need for your operation.
-
Insert the required JavaScript.
Important: The JavaScript in the image above is an example and may not be applicable to your situation.
For more information on the kinds of binds you can apply to a business rule, refer to the JavaScript Binds topic in the Resource Materials documentation here.