Mandatory Data in Web UI
Mandatory validation means a value is required. This setting is available on an attribute, on a reference, or from within a workflow. For example, for products, setting the 'Accessory' reference type as mandatory ensures that the product cannot be approved until an accessory is selected.
Important: Careful testing is recommended when using mandatory validation.
-
A mandatory setting on an attribute or reference in workbench is applied in addition to other data validation settings applied at any level in the Web UI.
For example, if an attribute is defined as mandatory in the workbench, but a business condition is configured to set that same attribute to be read-only or hidden in the Web UI, then in the Web UI, a product displaying that attribute shows an error with no way to address the error.
-
A user cannot save an object if a mandatory value has been removed from a parameter; however, if the parameter has never had a value, the object can be saved.
-
Product objects cannot be approved until all mandatory values are added.
Mandatory objects, like the 'Ownership' attribute in the image below, are identified by:
-
An asterisk (*) to the left of the attribute name.
-
A red background color if the user clicks out of the field without adding a value.
-
The default message (shown above) or a custom message configured via a JavaScript business condition.
Note: The default message that displays for mandatory attributes and references when defined on the object itself overrides any custom messages configured to display when a JavaScript business condition is applied.
Recommended Use
-
A business condition is required when an attribute or a reference should be mandatory dynamically, that is, based on another setting in the node.
-
If an attribute or reference should always be mandatory, use the Web UI designer or other validation options to set the mandatory requirement on the object permanently. To create custom validation messages without using business rules, refer to the Custom Validation Error Messages topic in the System Setup documentation (here) or the Reference Help Text in the Web UI topic (here).
Mandatory validation can be set in the Web UI as defined in the linked topics below.
Attributes
Validation can be set on attribute objects as defined in:
-
Mandatory Attributes topic in the System Setup documentation (here)
- Mandatory Attributes in Web UI topic (here)
Business Conditions
Validation can be set dynamically based on other information on the node via business conditions as defined in:
-
Configuring Business Conditions in Web UI topic (here)
-
Mandatory Bind topic (for use with JavaScript business rules) in the Resource Materials online help documentation (here)
References
Validation can be set on reference type objects as defined in:
-
Reference Type - Advanced topic in the System Setup documentation (here)
Workflows
Validation can be set in workflows as defined in:
-
Workflow Mandatory Attributes in Web UI topic (here)