---
sourceDocument: Yokohama Build workflows
sourceDocumentLink: https://www.servicenow.com/docs/r/yokohama/build-workflows

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama Build workflows

ft:clusterId :

    - crworkflow

bundleId :

    - crworkflow

workflow :

    - Creator


---

# Look Up Records action

# Look Up Records action {#ariaid-title1}

Release version: Yokohama  
Updated January 30, 2025  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Look Up Records action

The Look Up Records action enables you to retrieve multiple records from any ServiceNow table by specifying search conditions.
It is a core Workflow Studio action available to users with theflowdesigneroradminroles and can be integrated into flows to dynamically query records based on defined criteria.
Show full answer Show less  

## Key Features

* **Inputs:** Specify the target table, conditions for filtering records, sorting field and order, and maximum number of records to return.
* **Outputs:** Provides the list of matching record Sys IDs, the table name, and the count of records found, all accessible as data pills for further flow logic.
* **Condition Configuration:** Supports field-value conditions and allows advanced queries using inline scripts with GlideRecord or GlideQueryCondition classes.
* **Sorting:** Allows sorting results alphabetically in ascending or descending order based on a specified field.
* **Performance Optimization:** Use conditions to narrow down results and limit Max Results (recommended 1000 or fewer) to enhance flow performance.

## Practical Guidance for ServiceNow Customers

* Use **For Each** flow logic to process each record individually when working with multiple results.
* Filter records precisely with conditions to reduce unnecessary data retrieval and improve efficiency.
* Set a reasonable maximum on results to avoid overloading system resources.
* Example use case: Lookup configuration items (**cmdbci**) assigned to a change requester by configuring the action to filter on the requester field and sort results by name.

## What to Expect

When configured, the Look Up Records action will return a list of record Sys IDs matching your criteria, the total number of records found, and the table name. These outputs can be leveraged in your flow to automate processes such as approvals, notifications, or data updates based on retrieved records.  
Look up multiple records on any table using defined conditions.

## Roles and availability {#lookup-records-flow-designer__section_pwq_rb5_kcb}

Available as a Workflow Studio ServiceNow core action. Users with the flow_designer or admin role can add an action to a flow and define configuration details.

## Inputs {#lookup-records-flow-designer__section_lx4_cfl_kyb}

Provide a value for each input that your flow needs. To add dynamic values, you can also drag pills from the Data panel or select them from the pill picker.{#lookup-records-flow-designer__inputs-description}

Table
:   Data type: Table Name

    Table name containing the records you want to look up.

Conditions
:   Data type: Conditions

    Field names and field values that you want to use to search for records. To use an inline script to specify conditions, consider using the GlideRecord and GlideQueryCondition
    classes to build your query. See [GlideRecord - Global](https://www.servicenow.com/docs/access?context=c_GlideRecordAPI&version=yokohama&pubname=yokohama-api-reference&ft:locale=en-US) and [GlideQueryCondition - Global](https://www.servicenow.com/docs/access?context=c_GlideQueryConditionAPI&version=yokohama&pubname=yokohama-api-reference&ft:locale=en-US).

Order by
:   Data type: Field Name

    Field you want to use to sort results.

Sort Type
:   Data type: Choice

    Option to sort alphabetically in ascending or descending order.

Max Results
:   Data type: Integer

    The maximum number of record results the action can return.

## Outputs {#lookup-records-flow-designer__section_zch_jln_lyb}

These outputs appear in the Data panel. You can use them as inputs elsewhere in your flow.{#lookup-records-flow-designer__outputs-description}

Records
:   Data type: Records

    List of record Sys IDs found based on the lookup criteria that you provided. For more information, see [Records.\[Table\] data type](hpNglAeehDjedWVXwoHMRQ "Stores one or more Sys ID references to records in a specific table. The Records data format is also known as a Glide List since it stores a list of GlideRecord Sys ID values.").

Table
:   Data type: Table Name

    Table that contains the list of records.

Count
:   Data type: Integer

    Number of records that the action returned.

## General guidelines {#lookup-records-flow-designer__section_x2g_czf_gcc}

Use these general guidelines when working with the Look Up Records action.  

Process records with For Each flow logic
:   Use For Each flow logic to iterate through a list of records. For more information about using For Each flow logic, see [For Each flow logic](https://www.servicenow.com/docs/sXDICSCto7~hbNZyHxR6lQ "Apply one or more actions to each record in a list of records.").

Set Max Results to improve performance
:   Set the Max Results input to 1000 records or lower to improve the performance of your flow. The more records that the system has to look up, the more system resources it takes to identify and process them.

Use conditions to filter records
: Use conditions to limit the number of records the action returns. The more specific conditions that you can provide, the better performance your flow has.  

## Look up configuration items assigned to a change request user {#lookup-records-flow-designer__example_p5y_yqw_sbc}

In this example, the flow starts when an emergency change request is opened in the Network category. The Look Up Records action uses the Configuration Item \[cmdb_ci\] table as the Table input. The Conditions input looks for
configuration items assigned to the requester of the change request. The Order by input uses the Name field to perform an ascending alphabetical type sort.

In the execution details, the Count output shows three configuration items that are assigned to the requester of the change request. The Records output shows the configuration items by name in the execution details page, but the
data pill contains a series of Sys ID values. The Table output is the Configuration Item \[cmdb_ci\] table.

