Form Rules

Form Rules

Form Rules allow you to define rules to automate certain actions on form fields based on custom conditions.

Supported Form Types: Incident request forms, service request forms, change forms,  problem forms, and release forms.

Form Rules are executed at the client-side only.

Creating a Form Rule   

Incident/Service Request Form Rules   

To create an incident/service request form rule,
  1. Go to Setup > Templates & Forms > Form Rules.
  2. Choose the preferred type from the dropdown: Incident Request or Service Request.

  1. Click New Rule.
  2. Under the Rule Definition section,
    1. Provide relevant Name and Description.
    2. Choose either All Customers or One Customer from the drop-down.
    3. Rule Applies for: Select the preferred users to whom the rule should be applied. The available options are All Users, Requesters, and Technicians.
    4. Rule Applies to: Choose the preferred option.
    5. Selected Template - Restrict the rule to selected templates and add the preferred templates from the dropdown that appears.  
    6. All Templates - Apply the rule for all templates.
  3. Execute when a request is: Choose the preferred checkbox(es):
    1. Created - Apply the rule when the request form is created.
    2. Edited - Apply the rule when the request form is edited.
  4. Also, use the dropdown to choose the preferred option:
    1. On Form Load - Apply the rule when the form loads
    2. On Field Change - Apply the rule when a field value changes and also choose the preferred field using the dropdown.
    3. On Form Submit - Apply the rule when the form is submitted.

 
Info
Note: On Form Submit event supports only the actions Set Value to Field and Clear Field Value.
  1. Under the Conditions section, configure the criteria based on which the rule should be applied.
    1. Use the dropdown to select the preferred field.
    2. Select the preferred condition: is, is not, is empty, or is not empty.
    3. Choose the relevant field value.
Info
You can create multiple criteria. To add a new criterion, click the plus icon and repeat the above steps. To remove a criterion, click the minus icon against the preferred criterion.
Under the Actions section, configure the action to be performed. The available options are as follows.
  1. Show Fields: You can display the required fields using this action.
  2. Hide Fields: This will help in preventing certain fields from being displayed.
  3. Enable Fields: A user can edit fields that are enabled.
  4. Disable Fields: A user cannot edit disabled fields.
  5. Mandate Fields: This action activates the mandatory property of a field.
  6. Non-Mandate Fields: This action deactivates the mandatory property of a field.
  7. Show Resource:  This action displays given resources in the request form.
  8. Hide Resource: This action hides given resources in the request form.
  9. Clear Options: You can eliminate all the options under a Select drop-down menu of a field using this.
  10. Add Options: This will append options to a given Pick List/Multi-Select/CheckBox field in the request/change form. You will be able to select these options later while accessing the field.
  11. Remove Options: You can eliminate selected options appended to a field using this action.
  12. Set Value to Field: You can set a default value to a field.
  13. Clear Field Value: This action clears the value of a field in the request form.
  14. Set Tasks#: Select tasks that must be created in a request that matches the specified conditions. Users, however, can remove these tasks when they create a request.
  15. Hide Tasks#: Use this option to prevent users from viewing a task. You can also set and hide a task thereby preventing users from removing the task.
  16. Unset Tasks#: Select tasks that are not to be created in a request. You can also hide and unset a task thereby preventing users from creating the task.
  17. Unhide Tasks#: Hidden tasks in requests, on other circumstances, might need to be displayed for users. You can then use this option.
  18. Execute Custom Scripts: Using this option, you can execute scripts to modify request forms dynamically based on user input.
  19. # - These options are available only when Rule applies to is set to Selected Templates.
  20. Click Save.
 
Alternatively, you can also create rules in the template editor under Form Rules tab. To access it, go to Setup > Templates & Forms > Select the preferred template (Incident Template or Service Template) and then go to Form Rules tab by creating a new template or editing an existing template.
 

Info
Note: Use the toggle under Rule options to enable/disable the rule if required.
Form Rules cannot be executed upon spot editing of request fields in the Details page. However, users have the option to disable spot editing in requets when Form Rules are created, using the Advanced Portal Settings.
Once a form rule is created for a customer. Then customer in the form rules cannot be changed.

Sample Request Form Rule:

 

Problem Form Rules   

Role Required: SDAdmin

To configure problem form rules,
  1. Go to Setup > Templates & Forms > Form Rules.
  2. Choose Problem from the drop-down:

  1. Click New Rule.
  2. Rule Name: Provide a name for the rule. This field is mandatory.
  3. Description: Provide a brief description about the rule.
  4. Select All Customers or the respective Customer from the dropdown.
  5. Rule applies for: Technician is auto-populated in this field and cannot be edited.
  6. Rule applies to: Choose if you want to apply the rule to specific templates or all templates. If you choose to apply the rule to specific templates, add the preferred templates.
  7. Execute on: Choose if you want to execute the rule in new problem form or edit form.
  8. In the event of: You can configure field and form rules for three events:
  9. Form Load - Apply the rule each time when the form is accessed or opened.
  10. Field Change - Apply the rule when a selected field value is changed.
  11. Form Submit - Apply the rule when the form is submitted.
  12. Note: The Form Submit event supports only the actions Set Value to Field and Clear Field Value.

  1. Under the Conditions section, configure the criteria based on which the rule should be applied.
  2. Use the dropdown to select the preferred field.
  3. Select the preferred condition: is, is not, is empty, or is not empty.
  4. Choose the relevant field value.
Info
You can create multiple criteria. To add a new criterion, click the plus icon and repeat the above steps. To remove a criterion, click the minus icon against the preferred criterion.
  1. Under the Actions section, configure the action to be performed. The available actions are as follows:
  2. Show Fields: Display required fields.
  3. Hide Fields: Hides certain fields.
  4. Enable Fields: Enable and edit fields.
  5. Disable Fields: Disable fields from being edited. The value of the disabled field will be retained.
  6. Mandate Fields: Activate the mandatory property of a field.
  7. Non-Mandate Fields: Deactivate the mandatory property of a field.
  8. Clear Options: Remove all options under a select drop-down menu of a field.
  9. Add Options: Add options to a given pick list or multi-select field in the form. You will be able to select these options later while accessing the field.
  10. Remove Options: Eliminate selected options added to a field.
  11. Set Value to Field: Set a default value to a field.
  12. Clear Field Value: Clear the value of a field in the problem form.
  13. You can use Toggle under Rule Options to disable the rule if required.
  14. Click Save.

Info
Form Rules will not be applied during spot edit in the problem details page.
You can disable spot edit in problem details page via Advanced Portal Settings.

Sample Problem Form Rule:  

 
 
 
 

Change Form Rules   

To create a change form rule,
  1. Go to Setup > Templates & Forms > Form Rules.
  2. Choose Change from the dropdown.

  1. Click New Rule.
  2. Under the Rule Definition section,
  3. Provide relevant Name and Description.
  4. Select the respective Customer from the dropdown.
  5. Rule Applies for: Select the preferred users to whom the rule should be applied. The available options are All Users, Requesters, Technicians, and All Users Except Change Manager, Change Owner, and SDChangeManager.
  6. Rule Applies to: Choose the preferred option.
  7. Selected Template - Restrict the rule to selected templates and add the preferred templates from the dropdown that appears.  
  8. All Templates - Apply the rule for all templates.
  9. Execute on: Choose the preferred checkbox(es):
  10. New Form: Execute rules in new change form.
  11. Edit Form: Execute rules in change edit form.
  12. In the event of: Use the dropdown to choose the preferred option:
  13. Form Load - Apply the rule when the form loads
  14. Field Change - Apply the rule when a field value changes and also choose the preferred field using the dropdown.
  15. Form Submit - Apply the rule when the form is submitted.

 
Info
Note: Form Submit event supports only the actions Set Value to Field, Clear Field Value, and Execute Custom Script.
  1. Under the Conditions section, configure the criteria based on which the rule should be applied.
  2. Use the dropdown to select the preferred field.
  3. Select the preferred condition: is, is not, is empty, or is not empty.
  4. Choose the relevant field value.
Info
You can create multiple criteria. To add a new criterion, click the plus icon and repeat the above steps. To remove a criterion, click the minus icon against the preferred criterion.

  1. Under the Actions section, configure the action to be performed. The available options are as follows.
  2. Show Fields: You can display the required fields using this action.
  3. Hide Fields: This will help in preventing certain fields from being displayed.
  4. Enable Fields: A user can edit fields that are enabled.
  5. Disable Fields: A user cannot edit disabled fields.
  6. Mandate Fields: This action activates the mandatory property of a field.
  7. Non-Mandate Fields: This action deactivates the mandatory property of a field.
  8. Show Resource:  This action displays given resources in the request form.
  9. Hide Resource: This action hides given resources in the request form.
  10. Clear Options: You can eliminate all the options under a Select drop-down menu of a field using this.
  11. Add Options: This will append options to a given Pick List/Multi-Select/CheckBox field in the request/change form. You will be able to select these options later while accessing the field.
  12. Remove Options: You can eliminate selected options appended to a field using this action.
  13. Set Value to Field: You can set a default value to a field.
  14. Clear Field Value: This action clears the value of a field in the change form.
  15. Execute Custom Scripts: Using this option, you can execute scripts to modify request forms dynamically based on user input.
  16. Show Custom Widget: Show custom widgets in the right pane of a change add/edit form using Form Rule.
  17. Hide Custom Widget: Hide custom widgets from the right pane of a change add/edit form using Form Rule.
  18. Click Save.
Alternatively, you can also create rules in the template editor under Form Rules tab. To access it, go to Setup > Templates & Forms > Change and then go to Form Rules tab by creating a new template or editing an existing template.
Info
Note: Use the toggle under Rule options to enable/disable the rule if required.
Form Rules cannot be executed upon spot editing of change fields in the Details page. However, users have the option to disable spot editing in change and if Form Rules are present, using the Advanced Portal Settings.

Sample change form rule:

 

Release Form Rules   

To configure release form rules,
  1. Go to Setup > Templates & Forms > Form Rules.
  2. Choose Release from the drop-down:

  1. Click New Rule.
  2. Under the Rule Definition section,
  3. Provide relevant Name and Description.
  4. Select the respective Customer from the dropdown.
  5. Rule Applies for: Select the preferred users to whom the rule should be applied. The available options are All Users, and All Users Except Release Manager, Release Engineer, and SDReleaseManager.
  6. Rule Applies to: Choose the preferred option.
  7. Selected Template - Restrict the rule to selected templates and add the preferred templates from the dropdown that appears.  
  8. All Templates - Apply the rule for all templates.
  9. Execute on: Choose the preferred checkbox(es):
  10. New Form: Execute rules in new change form.
  11. Edit Form: Execute rules in change edit form.
  12. In the event of: Use the dropdown to choose the preferred option:
  13. Form Load - Apply the rule when the form loads
  14. Field Change - Apply the rule when a field value changes and also choose the preferred field using the dropdown.
  15. Form Submit - Apply the rule when the form is submitted.

 
Info
Note: Form Submit event supports only the actions Set Value to Field, Clear Field Value, and Execute Custom Script.
  1. Under the Conditions section, configure the criteria based on which the rule should be applied.
  2. Use the dropdown to select the preferred field.
  3. Select the preferred condition: is, is not, is empty, or is not empty.
  4. Choose the relevant field value.
Info
You can create multiple criteria. To add a new criterion, click the plus icon and repeat the above steps. To remove a criterion, click the minus icon against the preferred criterion.
Under the Actions section, configure the action to be performed. The available options are as follows.
  1. Show Fields: You can display the required fields using this action.
  2. Hide Fields: This will help in preventing certain fields from being displayed.
  3. Enable Fields: A user can edit fields that are enabled.
  4. Disable Fields: A user cannot edit disabled fields.
  5. Mandate Fields: This action activates the mandatory property of a field.
  6. Non-Mandate Fields: This action deactivates the mandatory property of a field.
  7. Clear Options: You can eliminate all the options under a Select drop-down menu of a field using this.
  8. Add Options: This will append options to a given Pick List/Multi-Select/CheckBox field in the request/change form. You will be able to select these options later while accessing the field.
  9. Remove Options: You can eliminate selected options appended to a field using this action.
  10. Set Value to Field: You can set a default value to a field.
  11. Clear Field Value: This action clears the value of a field in the release form.
  12. Click Save.
 
Alternatively, you can also create rules in the template editor under the Form Rules tab. To access it, go to Setup > Templates & Forms > Release and then go to the Form Rules tab by creating a new template or editing an existing template.
Info
Use the toggle under Rule Options to disable the rule if required.

Sample release form rule:
  

List View Actions                      

You can manage the form rules from the list view page and perform the following actions:
  1. Edit/Delete/Enable/Disable Rules - Use the icon to edit, delete, enable, or disable a rule. You can also use the Actions button on the toolbar to do the same actions
  2. Search Rules - Use the icon to search through rules based on a criteria. Add the criteria, value, and click Enter. After the results are displayed, you can add multiple search criteria using the icon or click on the existing criteria to edit it.
  3. Customize List View - Limit the number of templates and define the sort order of the templates displayed in the list view using icon .
  4. Filter by event - You can use the Filter by event drop-down to filter the rules displayed based on their configured events.
  5. Status: Enable or Disable a template using the status toggle.



    • Related Articles

    • Configure Custom Scripts for Form Rules

      Tabulated below are some of the sample scripts that can be performed as actions in request/change Form Rules. Requirement Script Examples Remarks Alert (Requests & Changes) await CS.alert(“message”); await CS.alert("Alert message"); Confirm (Requests ...
    • Sync Rules

      Sync rules define the data to be synced from assets, users, or software installations to CMDB. The synced data is populated as CIs in CMDB and linked to the corresponding asset, user, or software. You can perform various actions on CIs and their ...
    • Closure Rules

      Closure rules automate the collection of vital details and execute relevant actions before a record can be closed in the service desk. Supported Modules: Requests, Problems, Changes, Releases, Purchase Orders, Tasks Role Required: SDAdmin Benefits: ...
    • Business Rules

      Configure Business Rules Business rules are used to automate actions on a request that fulfill certain incoming criteria. The criteria for the rules are set using the request fields. Business rules can be used to automate actions on incident, ...
    • Notification Rules

      Notification rules allow you to specify conditions when a key event must be alerted to users. Supported Modules: Requests, Problems, Changes, Projects, Release, Solutions, Assets, Purchase, Contracts, Tasks, and other general events. Role Required: ...