Search Tasks

Search for Tasks in ServiceNow.

The input and output fields on this card are dynamically generated based on your ServiceNow instance. These fields include the default fields provided by ServiceNow. For example, Active, Approval history, Description, Time worked, and any custom fields you've added to your Task or Catalog Task tables.

Also, input fields depend on the Search By and Result Set options. For example, fewer input fields are available if you choose Search By Like. This topic describes some common input and output fields.

Options

Field Definition Type Required

Result Set

Specifies the number of tasks returned in the response.

Choose a method to filter search results:

  • First Matching Record: Returns the first record that matches.

  • First 200 Matching Records: Returns the first 200 matching records.

  • Stream Matching Records: Passes all matching records from your parent flow to a helper flow.

    Selecting this option adds a Streaming input section to the card where you can select a helper flow for streaming and add custom extensible fields.

Dropdown

TRUE

Search By

Specifies how to compare input text values. Searches all text fields. Choose an operator to search by:

  • Like: Returns email addresses with partial matching of entered text or number values. For example, search in the Sender field for words that contain Smith.

  • Equals: Returns email addresses when the search fully matches the entered text or number values. For example, search for all subjects that contain Important.

  • Starts With: Returns email addresses when the search starts with the entered text or number values.

Dropdown

TRUE

Task Type

Choose one of the Task types to search:

  • Task: The base task type in ServiceNow. Searches for task records.

  • Catalog Task: A subtype of task specific to the Service Catalog. Searches for sc_task records.

Dropdown

TRUE

Input

If you specify multiple search criteria, they're combined to create the query. The resulting output is the group that matches all criteria.

However, if you don't specify any search criteria, the card returns all fields for available records.

Field Definition Type Required

Search

Number

An identifying number for each task record.

This field is the display value for the Task table.

The system generates this number when the task is created.

Text

FALSE

Description

A long description of the work to be done.

Text

FALSE

Short description

A short description of the task. This description is used as a title for the record.

Text

FALSE

Streaming

Flow

Click Choose Flow to browse and select a helper flow where the search results will be streamed, then click Choose to confirm.

Optionally, click the empty field under Click or drop here to create and add custom extensible fields that pass data to the helper flow. These fields are added as key/value pairs under the State output object in the helper flow.

Appears when Stream Matching Records is selected from the Result Set option.

Flow

TRUE

Search Criteria

Record Limit

Specify the number of records to stream.

  • When the Limit field is set to 0, the stream returns no records.

  • When the Limit field is set to greater than 0, the stream returns up to the maximum number specified.

  • When the Limit field is empty, null, or not selected, the stream returns all records.

  • The default value is 10000000 (10 million).

  • The valid range is 0 to 10000000.

This field appears when you select Stream Matching Records from the Result Set option.

Number

FALSE

Output

Field Definition Type

Result

Number

An identifying number for each task record.

This field is the display value for the Task table.

The system generates this number when the task is created.

Text

Description

A long description of the work to be done.

Text

Short description

A short description of the task. This description is used as a title for the record.

Text

Additional comments

Comments about the task record.

Each comment is inserted into the Activity field.

Text

Opened

The date and time when a human opened the task record for the first time.

Date & Time

Approval history

History of approvals for the record.

Text

Watch list

Specifies the users that receive email and SMS notifications when the record is updated.

By default, only the Incident, Change, and Service Catalog applications notify users listed in this field.

For other Task-based applications, you must create and send custom email notifications to these users.

Text

Priority

Specifies how high a priority the task should be for the assignee.

By default, the calculatePrioritybusiness rule calculates this value based on the Impact and Urgency values.

Record lists then color-code each task by degree of priority.

Number

Work notes list

Specifies the users that receive email and SMS notifications when work notes are added to the record.

By default, only the Change, Problem, and Service Catalog applications notify users listed in this field.

For other Task-based applications, you must create and send custom email notifications to these users.

Text

Assigned to

Specifies the user assigned to complete the task.

By default, this field uses a reference qualifier to only display users with the itil role. Some applications override the parent reference qualifier to display relevant users.

For example, the Service Order and Project Task tables filter users based on their skills.

Text

Active

Specifies whether work is still being done on a task or whether the work for the task is complete.

By default, only application-specific business rules set the value of this field.

For example, the incident autoclose business rule closes resolved incidents that haven't been updated for one day.

True/False

Escalation

Indicates how long the task has been open.

Escalations are dynamically populated using service level agreements, which specify how long a task remains in each escalation state.

Escalation states go from Normal to Moderate to High, and finally to Overdue.

Record lists then color-code each task by escalation state.

Number

State

Status of the task. Values include the following:

  • Pending

  • Open

  • Work in Progress

  • Closed Complete

  • Closed Incomplete

  • Closed Skipped

Applications typically use dictionary overrides to display application-specific states.

Number

Time worked

Displays a timer that measures how long a record is open in the form view.

Text

Work notes

Displays and allows the entry of comments viewable only by ITIL users.

Each comment is inserted into the Activity field. See Journal field type.

Text

Created

Displays the date and time when the task record was created.

Date & Time

Sys ID

The unique record identifier (sys_id) for the task.

Text

Records Streamed

Number of records streamed in a streaming flow.

This field appears when you select Stream Matching Records from the Result Set option.

Number

Related topics

ServiceNow connector

Workflow elements

Guidance for ServiceNow connector

ServiceNow API reference