---
sourceDocument: Zurich Build workflows
sourceDocumentLink: https://www.servicenow.com/docs/r/zurich/build-workflows

 Release :

    - zurich

ft:locale :

    - en-US

ft:publication_title :

    - Zurich Build workflows

ft:clusterId :

    - crworkflow

bundleId :

    - crworkflow

workflow :

    - Creator


---

# Look Up Records step

# Look Up Records step {#ariaid-title1}

Release version: Zurich  
Updated July 31, 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 step

The Look Up Records step in Workflow Studio enables you to search for multiple records within any table based on defined conditions.
This action step is designed for users with theactiondesignerrole who want to create custom actions that involve querying records efficiently.
Show full answer Show less  

## Inputs

* **Table:** Specify the table name where records will be looked up.
* **Conditions:** Define field names and values to filter the search results. Inline scripts using `GlideRecord` or `GlideQueryCondition` can also be used to build queries.
* **Order by:** Choose the field to sort the results.
* **Sort Type:** Select ascending or descending order for sorting.
* **Max Results:** Set the maximum number of records to return, which helps control performance.
* **Action error evaluation:** Decide whether the workflow should continue or evaluate an error if this step fails.

## Outputs

* **Records:** A list of Sys IDs for the records found based on your criteria, usable as inputs in other flow steps.
* **Table:** The name of the table containing the returned records.
* **Count:** The number of records returned by the lookup.

## Best Practices

* **Process records with For Each logic:** Use For Each flow logic or a Script step to iterate and process records returned by the lookup.
* **Optimize Max Results:** Limit Max Results to 1000 or fewer to maintain system performance.
* **Use specific conditions:** Apply precise filters to reduce the number of records returned and improve efficiency.

## Why it matters

This step allows ServiceNow customers to efficiently retrieve multiple records from any table based on dynamic or scripted conditions, enabling automation and data processing within workflows. Proper use of inputs and best practices ensures high performance and scalability in your custom actions.  
Look up multiple records on any table using defined conditions.

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

Available as an Workflow Studio action step. Users with the action_designer role can create a custom action with one or more action steps.

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

Provide a value for each input that your action needs. To add dynamic values, you can also drag pills from the Data panel or select them from the pill picker.{#lookup-records-action-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=zurich&pubname=zurich-api-reference&ft:locale=en-US) and [GlideQueryCondition - Global](https://www.servicenow.com/docs/access?context=c_GlideQueryConditionAPI&version=zurich&pubname=zurich-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 step can return.

## Action error evaluation {#lookup-records-action-designer__id_lg2_4s3_15b}

If this step fails
:   Data type: Choice

    Option to continue running the next step or go to error evaluation. To use the step status code or message for a custom action error condition, see [Action error evaluation](https://www.servicenow.com/docs/vfKPFEPOn~v8baKgj~FvrA "Enable actions to catch step failures and continue running. Identify when specific error conditions occur and return your own action status code, status message, and error state.").

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

These outputs appear in the Data panel. You can use them as inputs elsewhere in your flow.{#lookup-records-action-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](frx2mUkPDQOcXP2MKjuHhg "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 step returned.

## General guidelines {#lookup-records-action-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/p4Nj9Qj05grn6Omrr6XPBg "Apply one or more actions to each record in a list of records."). Alternatively, you can use a Script step to process a list of records within a custom action.

Set Max Results to improve performance
:   Set the Max Results input to 1000 records or lower to improve the performance of your action. 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 step returns. The more specific conditions that you can provide, the better performance your action has.

## Example {#lookup-records-action-designer__section_zf4_dj5_kcb}


