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

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Build workflows

ft:clusterId :

    - crworkflow

bundleId :

    - crworkflow

workflow :

    - Creator


---

# Look Up Records step

# Look Up Records step {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](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 in any ServiceNow table based on defined conditions.
This action step is designed to efficiently retrieve records by specifying search criteria, sorting options, and limiting the number of results, making it easier to automate and streamline workflows.
Show full answer Show less  

## Key Features

* **Roles and Availability:** Available as an action step in Workflow Studio; requires the `actiondesigner` role to create custom actions containing this step.
* **Inputs:**
  * **Table:** Specify the table name to search for records.
  * **Conditions:** Define field names and values to filter the records. Inline scripting with `GlideRecord` and `GlideQueryCondition` is supported for advanced queries.
  * **Order by and Sort Type:** Select a field and sort direction (ascending or descending) to order the results.
  * **Max Results:** Limit the number of records returned to improve performance.
  * **Action Error Evaluation:** Choose whether the workflow continues or triggers error handling if this step fails.
* **Outputs:**
  * **Records:** Returns a list of record Sys IDs matching the lookup criteria.
  * **Table:** Confirms the table from which records were retrieved.
  * **Count:** Indicates the number of records returned.

## Best Practices

* **Use For Each flow logic** to process individual records from the returned list efficiently within your workflow.
* **Limit Max Results** to 1000 or fewer records to optimize performance and reduce system resource consumption.
* **Apply Specific Conditions** to filter records precisely, which improves lookup speed and reduces unnecessary data processing.

## Practical Benefits for ServiceNow Customers

This step empowers ServiceNow customers to automate complex record retrieval tasks within workflows, enabling more dynamic and data-driven processes. By leveraging conditions, sorting, and result limits, customers can retrieve exactly the records they need while maintaining system efficiency and managing error handling gracefully.  
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=brazil&pubname=brazil-api-reference&ft:locale=en-US) and [GlideQueryCondition - Global](https://www.servicenow.com/docs/access?context=c_GlideQueryConditionAPI&version=brazil&pubname=brazil-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](DYUWPGHPp4xlTo_Ny0q7aQ "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](ckMmcCE4C1mMUiLvEju9Kg "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/esmLMDyz1JByfBNkIp58zw "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}


