The steps below will show how to define rules to change the property of fields.
In the following scenario the agent can choose to automatically share the solution of the ticket with the customer. When the agent selects “Share solution”, fills in the “Solution” and the “Resolved on” date, a workflow is triggered that sends out an e-mail including the solution. Without filling the “Resolved on” date the workflow isn’t triggered, therefore this field needs to be mandatory.
The challenge is that the “Resolved on” field should only be visible and mandatory when the “Share solution” is selected so that the ticket screen is clearly organized and that this happens before saving the ticket.
1. Navigate to “Adapt” and “Edit Master Layout”.
2. Select the field.Navigate to and select the field for which you want to determine property rules.
By clicking on the Change Properties you can create rules to determine if this field should be visible, mandatory or read-only. In this scenario we want “Resolved On” visible and mandatory only when the field “Share Outcome” is checked.
When creating the rule the first step is to fill in the “Rule Name”. By clicking on the icon that is marked green you can enter the Rule Name. Hereafter you can filter and search for the fieldname that you want to use in the code for rule.
3. Create the rule.
Using the filter option helps to quickly find the field you need. By clicking on the + sign the field will be added to the code. After adding the field you need to select an operator or function that can be used in the code. In this case we add the operator “Equal To” to the code by clicking on the + sign here as well. After selecting the correct field and operator or function you need to determine the last part of the code. The code until this moment is field “Share Outcome” is “Equal To”. Because the “Share Outcome” field is an indicator field type (checkbox) the field has the values 0 (unchecked) and 1 (checked). Therefore we add the value 1 to the code, which is now complete. By clicking on “Apply” the rule is created and saved.
4. Apply the rule for field properties.Rules can be used for multiple property definitions, like in this specific scenario where we can use the same rule for making the field visible and mandatory.
- Rules are defined by administrators/key-users that have the ability to adapt the master lay-out.
- Rules to change the property of fields applies for fields, sections and facets.
- Rules can be applied to make fields visible, mandatory or read only.
- Rules can be defined for both KUT-fields as for standard fields.
- Rules aren’t applied on “on-save” but immediately when the rules are met.
- The rules are executed only on client side, not on server.
- Rules will apply both online and offline.
- Rules are applied to the Master Lay-Out. The module rule property can be seen as the replacement for creating page lay-outs.
- It is possible to make rules by comparing the date fields.
- Key-users can disable all the Model Property Rules at once via “Adapt” --> “Disable Key User Property Evaluation”.