jsn / ServiceNow, simplified.
AustraliaREFERENCE GUIDE

Look Up Record action

On this page

Look Up Record action

Look up a record from any table based on defined conditions.

Roles and availability

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.

Fields

<table id=“table_fdl_yhf_kcb”><thead><tr><th>

Field

</th><th>

Description

</th></tr></thead><tbody><tr><td>

Table

</td><td>

Select a table from the list.

</td></tr><tr><td>

Conditions

</td><td>

Conditions the returned record must meet.

When building a condition that looks up the value of a reference field, use a data pill that explicitly provides the Sys ID value. Ensure the condition has the format [reference field][is][Reference type data pill->Sys ID]. For example, both the Change and Incident tables contain a reference field to the User table. To look up change records where the requester is the caller from an incident record, create the condition [Requested by][is][Trigger->incident record->Caller->Sys ID].

</td></tr><tr><td>

Order by

</td><td>

Determines how to sort results when more than one record matches the defined conditions. Select the field you want to use to sort results.

</td></tr><tr><td>

Sort Type

</td><td>

Select whether to sort alphabetically in ascending or descending order.

</td></tr><tr><td>

If multiple records are found

</td><td>

Determines what information to return when more than one record matches the defined conditions. - Return only the first record - Fail the step

</td></tr><tr><td>

Don’t fail on error

</td><td>

Determines whether to fail the flow when the lookup can’t find a record.

</td></tr></tbody> </table>## Outputs

These outputs appear in the Data panel. You can use them as inputs elsewhere in your flow.

  • Record

    Data type: Record

    Record found based on the conditions you specified in the Conditions input.

  • Table

    Data type: Table

    Name of the table associated with the returned record.

  • Status

    Data type: Choice

    0 if a record was found successfully, and 1 if there was an error.

  • Error Message

    Data type: String

    Message containing details about why the record could not be found.

    Note: This output’s value is only populated if the Status output’s value is 1.

Example

[Omitted image “flow-example-look-up-record.png”] Alt text: Example Look Up Record action in a flow.

Parent Topic:Workflow Studio actions

Keep exploring.

Find another answer, or bring this documentation into your own tools.