Rendering rule examples

The following examples demonstrate how to formulate rules for each of the rendering rule templates:

Disable field

The only parameter in this rule template is field. Select the required field from the drop-down list. When the rule runs, the selected field becomes disabled in the user interface.

Example: There is a rule in Change Management called disableStartDate, which disables the StartDate field.

Display list by alphabetical order

The only parameter in this rule template is enumeration field list. Select the enumeration field from the drop-down list. When the rule runs, the enumeration values in the selected field will be displayed in alphabetical order in the form.

Expand section by default

  1. For the form parameter, select the required form from the drop-down list.

  2. For the section parameter, select the required section from the drop-down list. The list displays the sections on the form selected.

  3. When the rule runs, it expands the selected section of the selected form by default.

Example: There is a rule in Service Request Management called openResolutionSection that automatically expands the Resolution section in the onlyResolution form.

Hide field

The only parameter in this rule template is field. Select the required field from the drop-down list. When the rule runs, the Hidden property is marked as selected for the selected field.

Example: There is a rule in Change Management called HideEmergencyChange which hides the EmergencyChange field.

Hide section

  1. For the form parameter, select the required form from the drop-down list.

  2. For the section parameter, select the required section from the drop-down list. The list displays the sections on the form selected. For full forms, you can also select to hide the Attachments part of the form.

  3. When the rule runs, it hides the selected section of the selected form.

Example: There is a rule in Change Management called HideReviewSection which hides the Review section. Select full for the form parameter and review for the section parameter.

Hide tab

The only parameter in this rule template is tab. Select the required tab from the drop-down list. You can hide the Discussion and History tabs. When the rule runs, the selected tab is hidden on the record page.

Example: In Problem Management, you can define the rule Hide Discussions to hide the Discussions tab on the record page for Problem records.

Restrict/allow editing of fields

Note The Restrict/allow editing of fields business rule functions both as a rendering rule and as a validation rule (in the user interface it appears under Rendering rules). It restricts or allows editing of selected fields.

  1. For the Restrict/allow parameter, select the required action - Restrict or Allow.

  2. For the all fields/specific fields parameter, specify the fields to which the action applies. Click All fields to restrict or allow editing of all fields for this record type. Click Specific fields to limit the restriction or permission to the selected fields. Select the required field from the drop-down list. Click Add item to add an another row to select an additional field. The default is All fields.

  3. When the rule runs, it restricts or allows editing of the selected fields. Restricted fields are unavailable for editing in the user interface. However, restricted field values can still be updated by workflow business rules.

    One use case for this business rule could be to disable all the fields of a record when it reaches the end of its workflow.

Example: There is a system rule for Requests that disables all fields on the request tracking page in the Service Portal.

Note  

  • All of the rules can be formulated with the "If...Then" option, which includes an expression parameter for the condition. Make sure to enter an Expression Language phrase that returns a boolean value.
  • Rendering rules are only available for the Rendering Forms process event.

Related topics