@servicenow/sdk - v4.13.3
    Preparing search index...
    interface DatabaseViewTable<T extends TableName = TableName> {
        $id: string | number | ExplicitKey<string>;
        active?: boolean;
        fields?: DatabaseViewField<T>[];
        leftJoin?: boolean;
        order?: number;
        table: T;
        variablePrefix: string;
        whereClause?: string;
    }

    Type Parameters

    Index

    Properties

    $id: string | number | ExplicitKey<string>
    active?: boolean

    Whether this joined table is active.

    true
    
    fields?: DatabaseViewField<T>[]

    Column names from table to expose in the view. Many real views join a table purely for filtering (via whereClause) without exposing any of its columns — omit or leave empty in that case.

    Each entry is an object with a required $id and field name. The $id is the unique identifier for the sys_db_view_table_field record, matching the platform's sys_id. Provide a unique $id for every field; use distinct $ids when the same field must appear more than once under the same view table.

    leftJoin?: boolean

    false (default) produces an INNER JOIN — only rows with matches in every joined table appear. true produces a LEFT OUTER JOIN — all rows from prior tables appear, with empty values for unmatched columns from this table. Needed for "find records with no related X" style reporting.

    false
    
    order?: number

    Join order relative to other tables in this view. Affects query performance on large tables — put the most selective/smallest table first.

    100
    
    table: T

    The table to join into the view. In a scoped app, prefer a table in the same scope, or a scoped table that extends an out-of-box table, when targeting platform data.

    variablePrefix: string

    Disambiguates this table's fields inside whereClause (e.g. usr for sys_user). The platform rejects prefixes containing an underscore or exceeding 30 characters, and must be unique across every table in the same view — a collision produces a broken or ambiguous join and is not caught by the platform itself.

    whereClause?: string

    A raw join/filter predicate using variablePrefix-qualified field names, e.g. usr_sys_id=role_user. This is not an encoded query string.