Mandatory Attributes in Web UI
Attributes can be made mandatory in the Web UI on a screen-by-screen basis, providing a visual indicator that data should be populated. Optional enforcement of the setting prevents users from saving or submitting data until mandatory attributes are populated. This provides a more granular level of enforcement than approval-mandatory attributes, and when configured for single-use screens, is considered a process-based mandatory setting. However, when screens are shared, this option has larger-scale implications that should be considered. It is also important to be aware that an attribute may be marked as mandatory on one screen, but not on another. Therefore, even when mandatory attribute population is enforced on a particular screen, that does not equate to an approval mandatory setting.
Attributes can also be set as mandatory in workbench as defined in the Mandatory Attributes topic of System Setup documentation.
Visual Indicators
Mandatory attributes shown in a Web UI Node Editor appear in black text preceded by a red asterisk.
To configure attributes to be mandatory, check the Mandatory parameter in any Attribute Value or Attribute Value Group component.
This setting alone does not enforce that the attribute must be populated; it provides a visual indicator to prompt the user to provide a value. To enforce population of the value, additional configuration is required, which is described in the 'Enforcement of Mandatory Attributes' section below.
Mandatory Attributes for Headers
Column headers in a Web UI Node List can also be made to display as mandatory through a configuration setting in the designer. Mandatory headers display in bold text followed by a red asterisk.
To configure headers in a tabular view to display as mandatory, set the Mandatory parameter on the header component to 'VisuallyMandatory.'
Headers that display as mandatory indicate to a user that cells under the header should contain a value, but this setting does not subject the column to validation enforcement. This means that, for example, even if the parameter 'Enforce Validity' is checked on the 'Save' button, empty cells under mandatory headers will not trigger an error upon saving.
More information on the Attribute Value Component and Attribute Value Group Component is available in this documentation.
Enforcement of Mandatory Attributes
Important: The information that follows about the enforcement of mandatory attributes in the Web UI is applicable regardless of how an attribute is set to mandatory (via workbench or during the Web UI screen-by-screen configuration).
To enforce that mandatory attributes are populated on the selected screen, the attributes must first be set as mandatory (as described above). In addition, any actions available on the screen that should enforce the population of mandatory attributes must have the Enforce Validity parameter selected. Typically this is applied to Save, Submit, or Approve actions.
When Enforce Validity is selected, the relevant action button will not be enabled until all mandatory attributes are populated.
Important: Consider whether or not this is truly desired before making this selection.
For example, when Enforce Validity is applied to the Save action, users cannot save any data until all mandatory attributes are populated. In addition, the implications for shared screens should be considered. For example, if the same screen is reused for both onboarding and maintenance of objects, different data may be required at different times. However, both the mandatory and enforcement settings are applied to the screen itself, not to particular instances where the screen is used, and therefore it cannot be differentiated to make an attribute mandatory in only one of the cases. This situation can be managed by creating separate Web UI screens for the processes, or by having the screens tied to workflows and using the workflow mandatory settings. For more information, refer to the Mandatory Attributes and References in Workflows topic in the Web User Interfaces documentation.