OBLYTECH Logo
OBLYTECH Logo

ServiceNow Remote Tables: Reading Another Instance’s Data

A remote table in ServiceNow is a table whose rows are not stored in the local database. Its definition lives on the instance, but each time a list containing the remote table’s data is refreshed, its query script fetches the records from another ServiceNow instance or an external system, and the results sit in memory.

What a remote table is

A remote table connects the platform to a third-party source or to another ServiceNow instance so it can retrieve external data on demand. You add columns, controls and application access the same way you would for an internal table, and users open it in lists and forms.

What differs is where the rows come from. An internal table draws its records from the platform database. A remote table does not. Its schema is stored on the instance, but its rows are produced by running a script against the external system and are held in memory while they are needed. Nothing is imported, so the external data is transient: a user can view it, and on an editable table update it, without a copy landing in a local table.

This design fits a case where another system already holds the records and a local team needs to see them next to local work.

Creating the table definition

The navigation path for a new remote table is System Definition, then Remote Tables, then Tables. Selecting the Remote Table option marks the table as remote. Once it is selected, the Extends Table field is hidden. That reflects a real restriction: unlike a standard internal table, a remote table cannot extend another table.

The name carries a prefix that cannot be changed: a namespace identifier followed by st_ for a scoped application, or u_st_ for the global application. The prefix cannot be changed, though the rest of the name can. Names may contain lowercase ASCII letters, digits and underscores.

To build the table, add columns in the Columns section using the Table Columns embedded list, set further options in the Controls section, define scope protection in the Application Access section, and then select Submit. The columns have to match the fields the external source returns, so study that structure before starting.

Each remote table also needs an external primary key. That key links the temporary rows to their source record. The platform generates a sys_id field automatically. That field appears in the Columns section and serves as the primary key for GlideRecord queries. External primary key values are converted to strings, so a numeric key from the source arrives as text. Building a remote table requires the delegated_developer or admin role.

Query and write scripts

A remote table gets its data from script definitions. To create one, go to All, then System Definition, then Remote Tables, then Definition, select New, and fill in the form. The Application field defaults to Global when no application context is set. The Advanced section holds the caching and editing settings. Creating a script definition requires the delegated_developer role with scripting permission, or the admin role.

The query script is the core of the setup. It retrieves data from the external source and runs whenever a list containing that table’s data is refreshed. It works through the v_table and v_query APIs. For the general REST side of calling outside systems, see REST and SOAP integrations.

Write operations use separate definitions. When the Editable option is selected, the table can insert, update and delete records in the external source from the instance, through the v_record API. Each operation has its own script definition. The Insert script runs when a record is added. The Update script runs when a record is changed. The Delete script runs when a record is removed. All three appear when Editable is selected. Enhanced Capacity, the option for larger row counts, is not supported on an editable table.

Several inactive script definitions can exist for one remote table, with one active definition at a time. Activating a definition associates it with the remote table.

Caching and row limits

Caching is controlled in the Advanced section of the script definition. The section exposes caching and editing settings, and it suits people comfortable with how the caching parameters interact with the query script.

Without caching, retrieved rows stay in memory while the list or form is open, and are then purged. With caching, the data stays in memory for the duration you set. That duration is the Cache TTL field, expressed in seconds. The default is 0, which means no caching. The maximum is 3600 seconds, or 60 minutes. A value of 300 keeps the data for five minutes. When the cache expires, the next use refreshes it from the external system.

The Cache Isolation Level sets who shares a cache. “Cache per user” is the default, so each user’s results are cached separately. “System Shared Cache” returns the same cached results to all users. The shared option suits data that all viewers may see in identical form, because a shared cache serves one result set to anyone who opens the list.

Each refresh of a list that includes remote data runs the query script again. With a cache, the rows stay in memory for the TTL window, and the external system is queried afresh once that window expires. In our judgment, a few minutes suits records that change slowly, and fast-changing records need a shorter window or no cache.

The default row limit is 1,000 rows. The Enhanced Capacity option raises that limit for larger data sets, and it is not supported on an editable remote table. Filtering and sorting on a remote table run after the rows arrive in the instance. Large results can therefore slow the instance, which is why small, well-scoped data sets work best.

Plugin and entitlement requirements

Remote tables depend on a plugin that must be active first. The plugin is the Remote Tables plugin, identified as com.glide.script.vtable. Activating it requires the admin role. The activation path is All, then System Applications, then All Available Applications, then All. Search for the Remote Tables plugin (com.glide.script.vtable).

The plugin includes demo data. It also activates the Transformation Service plugin, identified as com.glide.transform, if that plugin is not already active. The Transformation Service supplies the Transform APIs that remote tables can use.

Domain separation affects installation. If domain separation and delegated admin are both enabled, the admin user performing the activation must sit in the global domain. Otherwise the installation fails with a Plugin Activation error. Domain separation is unsupported for the remote table itself, so rows added to it are not separated by domain. Script definitions associated with the table can be domain separated instead, using DomainSupport APIs, so a design that needs separation should plan for that before building.

External data sources that sit outside the ServiceNow AI Platform carry an entitlement requirement. An Integration Hub subscription is required in that case.

Remote tables compared with Integration Hub

Remote tables and Integration Hub overlap, so the choice matters. A remote table is for retrieving external data on demand and holding it temporarily, optionally in a cache. Integration Hub is the better fit when the job is advanced data importing, transformation or a full integration workflow, including work built in Workflow Studio.

If people need to see external records as they are, in a list or form, a remote table is the direct route. If the records need copying, reshaping or scheduled transfer, an integration flow fits better. Each one brings its own setup and its own entitlement questions, so record the reason for choosing each one. For a wider view of picking an integration pattern, see which integration pattern to choose.

Frequently asked questions

Does a remote table store copies of the other instance’s records?

No. The table definition is stored on the instance, but its rows are not stored in the platform database. The rows come from the query script and stay in memory. Without caching, they are purged when the list or form closes. With caching, they remain for the duration set in the script definition.

Can users change records through a remote table?

Yes, when editing is enabled. An editable remote table can insert, update and delete records in the external source from the instance. Those writes need insert, update and delete script definitions alongside the query script.

How long does cached remote data last?

The duration is set in seconds in the Cache TTL field of the script definition. The default is 0, which means no caching. The maximum is 3600 seconds, or 60 minutes. A value of 300 keeps the data for five minutes before it is refreshed on the next use.

How many rows can a remote table return?

The default limit is 1,000 rows. The Enhanced Capacity option supports larger results, but it is not available on an editable remote table. Filtering and sorting run after rows arrive, so large results can slow the instance.

Does a remote table need an Integration Hub subscription?

It depends on where the external data sits. When the external data source lies outside the ServiceNow AI Platform, an Integration Hub subscription is required. Plan for that entitlement before building, since it applies to the whole design.

Can a remote table run with domain separation turned on?

Not for the table itself. Domain separation is unsupported in remote tables, so rows added to one are not separated by domain. Script definitions can be domain separated, so if your instance uses domain separation, plan the script definitions for it from the start.