Add Validations to Roles
NOTE: Role validations are views stored in a data source, typically the cMass_Data database. The view must exist in the database before the role validation can be added to the template.
Validations related to list boxes, check boxes, and required fields can also be triggered when validating a role, if certain parameters are enabled. Refer to Enable Role Validations for more information.
A user can also:
Import validations from the registered page
Register validations from any pages in any component
Page-level validations run against the pages to which they are registered and tie registration failures to that page. Role-level validations are tied to the page assigned for the template role.
NOTE: All registered validation views must contain the Request ID and ID columns from the Data Entry page for the template.
NOTE: To add validations to a role at the template level, the template must not be active or must be in Developer Mode. Refer to Modify an Active Template in Developer Mode for more information.
NOTE: If a template with Org Units uses role validations, the security view must be added to that role validation rule. Org Unit security can then restrict validation failures to records associated with Org Unit values, and users will only see validation failures for records they can access. Refer to Add the Org Unit Security View to Template Role Validation Rules for more information.
To add role validations to a template:
- Click Team on Navigation pane.
- Click Templates for a team.
- Click Roles for a template.
- Click Validations for a role.
Click Add; Vertical View displays.
Enter sort value in Priority field.
NOTE: If there are multiple validations, the priority is the order in which the validations are run.
Select an option from the WebApp ID list box if adding a page validation rule.
NOTE: The WebApp ID contains the page with the validation registered.
Select an option from the Page ID list box if adding a page validation rule.
NOTE: Validations are registered on this page. The page is contained in the WebApp selected in the WebApp ID list box.
Select an option in the Object Name list box if adding a page validation rule.
NOTE: The Object Name is the validation to import to the template role.
Select a data source from Data Source ID list box if adding a role-level validation.
NOTE: The Data Source ID contains the validation.
Select an option from the Role Object Name list box.
NOTE: The Role Object Name is the role-level validation.
Select severity from Severity list box.
NOTE: The Severity determines the severity of the failure if a page-level or role-level validation fails.
NOTE: Validation rules are assigned a Severity:
Error – Marks the role status as invalid until the error is corrected and the validation rule passes.
Message – Marks the role status as valid but a message displays.
Warning – Displays a message but the user can proceed with the task even if the validation fails.
Enter validation error text in Comment text field.
NOTE: The Comment is the message that will display to the user if the validation fails.
- Click Save.
Refer to Validate a Role for more information.