---
sourceDocument: Brazil Conversational Interfaces
sourceDocumentLink: https://www.servicenow.com/docs/r/conversational-interfaces

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Conversational Interfaces

ft:clusterId :

    - convint

bundleId :

    - convint

workflow :

    - Platform


---

# Lookup utility

# Lookup utility {#ariaid-title1}

Release version: Brazil  
Updated October 24, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read  
Use the Lookup utility in a Virtual Agent topic to return a ServiceNow record query.

## Lookup utility properties {#va-lookup__section_xwb_mgn_pdb}

{#va-lookup__table_nff_y1b_3db__entry__2}

| Property | Description |
|-|-|
| Node name | The name that identifies this Lookup utility node in the topic flow. |
| Variable name | The variable that stores the record returned by the script. The variable name is automatically created from the Node name property. |
| Table | The table used for the query. |
| Filter this table by using | The query to retrieve the record. Use the condition builder or a script to specify a query condition. |
| Advanced ||
| Hide this node ||
| Conditionally show this node if | No-code condition statement or low-code script that specifies a condition for presenting this node in the conversation. The condition must evaluate to true. |
[ ]

{#va-lookup__table_nff_y1b_3db}

## Example Lookup utility {#va-lookup__section_jxd_nh5_tdb}

Figure 1. Lookup utility basic properties

## Example Lookup script {#va-lookup__section_xzk_f3n_vdb}

    (function execute(table) {

           var gr = new GlideRecord(table);
           gr.addEncodedQuery('active=true');
           gr.setLimit(1);
           gr.query();
           if(gr.next()) {
              return gr;
        }
    })(table)

In this example, a table is queried for the first active record. The table to be queried is
defined in the Table property found in the lookup utility control.
The `setLimit()` method limits the query so that only a single record is returned from
the database. If a record is found, it is returned. For more information on GlideRecord
queries, see
[Querying tables in script](https://www.servicenow.com/docs/access?context=c_UsingGlideRecordToQueryTables&version=brazil&pubname=brazil-api-reference&ft:locale=en-US)
.

The Lookup utility stores the record it finds in the variable named in the Variable name property.

