Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.
Versions
  • Madrid
  • London
  • Kingston
  • Jakarta
  • Istanbul
  • Helsinki
  • Geneva
  • Store
Close

Forms in Service Portal category

Log in to subscribe to topics and get notified when content changes.

Forms in Service Portal category

Validate the functionality of fields and UI actions in Service Portal form widgets.

Service Portal dependency

Creating automated Service Portal steps requires knowledge of the ServiceNow data model and Service Portal form and data structures.

Open a Form (SP)

Opens a form in a portal.

Field Description
Execution order Integer specifying the order in which the test executes this step.

As you create steps, the system automatically assigns each step an incremental value. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

Active Check box to activate this test step for use.
Application Application scope in which the system runs this step.
Test Read-only name of the test that you are adding the step to.
Step config Read-only name of the step.
Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
Notes Notes about the test step.
Note: Use the condition builder to set the field value. The condition builder displays an appropriate control for the field data type. For example, a reference field displays a Lookup record control.
Portal Portal in which the defined form opens. Service Portal is the default.
Page Page to open in the defined portal. The form page is the default.
Table Table containing the form to open.
sys_id sys_id of the record to open. Default is -1, which opens a new record.
View The form view to open. If blank, the system uses the default view.
Query parameters Additional URL query parameters and values for the form.

Set Field Values (SP)

Sets the values of fields in a form. To use this step, you must have already opened a form using the Open a Form (SP) test step.

Field Description
Execution order Integer specifying the order in which the test executes this step.

As you create steps, the system automatically assigns each step an incremental value. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

Active Check box to activate this test step for use.
Application Application scope in which the system runs this step.
Test Read-only name of the test that you are adding the step to.
Step config Read-only name of the step.
Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
Notes Notes about the test step.
Note: Use the condition builder to set the field value. The condition builder displays an appropriate control for the field data type. For example, a reference field displays a Lookup record control.
Table The table for the form on which to set field values. The value should be the table in the Open a Form (SP) step.
Field values Fields for which to set values and the values to be set for those fields.

Field Values Validation (SP)

Validates field values on the current form based on defined conditions. To use this step, you must have already opened a form using the Open a Form (SP) test step.

Field Description
Execution order Integer specifying the order in which the test executes this step.

As you create steps, the system automatically assigns each step an incremental value. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

Active Check box to activate this test step for use.
Application Application scope in which the system runs this step.
Test Read-only name of the test that you are adding the step to.
Step config Read-only name of the step.
Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
Notes Notes about the test step.
Note: Use the condition builder to set the field value. The condition builder displays an appropriate control for the field data type. For example, a reference field displays a Lookup record control.
Table The table that contains the form on which to validate fields. The value should be the table in the Open a Form (SP) step.
Conditions Conditions used to validate one or more fields on the form. If the condition evaluates to true, the step passes.

Field State Validation (SP)

Validates field states on a form in Service Portal.

Field Description
Execution order Integer specifying the order in which the test executes this step.

As you create steps, the system automatically assigns each step an incremental value. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

Active Check box to activate this test step for use.
Application Application scope in which the system runs this step.
Test Read-only name of the test that you are adding the step to.
Step config Read-only name of the step.
Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
Notes Notes about the test step.
Note: Use the condition builder to set the field value. The condition builder displays an appropriate control for the field data type. For example, a reference field displays a Lookup record control.
Table The table for the form on which to validate field states. The value should be the table in the Open a Form (SP) step.
Visible Validates whether the fields on this form are visible. The test fails if the fields are not visible.
Not visible Validates whether the fields on this form are visible. The test fails if the fields are visible.
Read only Validates whether the fields on this form are read only. The test fails if the fields are not read only.
Not read only Validates whether the fields on this form are read only. The test fails if the fields are read only.
Mandatory Validates whether the fields on this form are mandatory. The test fails if the fields are not mandatory.
Not Mandatory Validates whether the fields on this form are mandatory. The test fails if the fields are mandatory.

UI Action Visibility Validation (SP)

Determines whether a UI action on the current Service Portal form is visible. To use this step, you must have already opened a form using the Open a Form (SP) test step.

Service Portal only supports server UI actions. The setRedirectURL() method and client UI actions are not supported. UI action visibility can vary depending on the currently logged in or impersonated user.

Field Description
Execution order Integer specifying the order in which the test executes this step.

As you create steps, the system automatically assigns each step an incremental value. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

Active Check box to activate this test step for use.
Application Application scope in which the system runs this step.
Test Read-only name of the test that you are adding the step to.
Step config Read-only name of the step.
Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
Notes Notes about the test step.
Note: Use the condition builder to set the field value. The condition builder displays an appropriate control for the field data type. For example, a reference field displays a Lookup record control.
Table The table for the form on which to check UI action visibility. The value should be the table in the Open a Form (SP) step.
Visible Fields from the UI Actions table to be checked for visibility. Includes only form-based UI actions. The test fails if the UI action is not visible on the form for the currently logged in user.
Note: If the list contains UI actions with the same name, check the form to determine the sys_id of the element. Then filter by sys_id in the UI Action table to select the correct element in the step.
Not visible Fields from the UI Actions table to be checked for visibility. Includes only form-based UI actions. The test fails if the UI action is visible on the form for the currently logged in user.
Note: If the list contains UI actions with the same name, check the form to determine the sys_id of the element. Then filter by sys_id in the UI Action table to select the correct element in the step.

Click UI Action (SP)

Selects a UI action on the current Service Portal form and outputs the table and sys_id of the record on which the action was selected.

To use this step, you must have already opened a form using the Open a Form (SP) test step. After using this step, you cannot use any other form steps.

Field Description
Execution order Integer specifying the order in which the test executes this step.

As you create steps, the system automatically assigns each step an incremental value. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

Active Check box to activate this test step for use.
Application Application scope in which the system runs this step.
Test Read-only name of the test that you are adding the step to.
Step config Read-only name of the step.
Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
Notes Notes about the test step.
Note: Use the condition builder to set the field value. The condition builder displays an appropriate control for the field data type. For example, a reference field displays a Lookup record control.
Table The table for the form on which to click a UI action. The value should be the table in the Open a Form (SP) step.
UI action The UI action to click, selected from the UI Actions table. Includes only form-based UI actions.
Assert type Specifies where to check for form submission after clicking the UI action:
  • --None--: Selects the UI action without validating mandatory or other fields.
  • Form submission canceled in browser: Checks whether the form was canceled in the browser and did not reach the server due to validation or other issues.
  • Form submitted to server: Checks whether the form was submitted to the server.

Submit a Form (SP)

Submits the current form in a Service Portal page and outputs the table and sys_id of the submitted record.

To use this step, you must have already opened a form using the Open a Form (SP) test step. After using this step, the page closes. You cannot use any other steps on the current page.

Field Description
Execution order Integer specifying the order in which the test executes this step.

As you create steps, the system automatically assigns each step an incremental value. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

Active Check box to activate this test step for use.
Application Application scope in which the system runs this step.
Test Read-only name of the test that you are adding the step to.
Step config Read-only name of the step.
Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
Notes Notes about the test step.
Note: Use the condition builder to set the field value. The condition builder displays an appropriate control for the field data type. For example, a reference field displays a Lookup record control.
Assert type Specifies where to check for form submission:
  • --None--: Submits the form without validating mandatory or other fields.
  • Form submitted to server: Checks if the form was submitted to the server.
  • Form submission canceled in browser: Checks whether the form was canceled in the browser and did not reach the server due to validation or other issues.
Feedback