@servicenow/sdk - v4.14.3
    Preparing search index...

    Interface CustomVariableType<MacroRefTable, SummaryRefTable, WidgetRefTable, MacroponentRefTable, TopicRefTable, Type>

    Configuration type for custom UI component variables

    interface CustomVariableType<
        MacroRefTable extends TableName = "sys_ui_macro",
        SummaryRefTable extends TableName = "sys_ui_macro",
        WidgetRefTable extends TableName = "sp_widget",
        MacroponentRefTable extends TableName = "sys_ux_macroponent",
        TopicRefTable extends TableName = "sys_cs_topic",
        Type extends
        
                | Record<MacroRefTable>
                | Record<SummaryRefTable>
                | Record<WidgetRefTable>
                | Record<MacroponentRefTable>
                | Record<TopicRefTable>
                | ExplicitKey
                | string =
            | Record<MacroRefTable>
            | Record<SummaryRefTable>
            | Record<WidgetRefTable>
            | Record<MacroponentRefTable>
            | Record<TopicRefTable>
            | ExplicitKey
            | string,
    > {
        __type__?: Type;
        $meta?: {
            installMethod?: "first install"
            | "demo"
            | "once";
            useEsLatest?: boolean;
        };
        active?: boolean;
        alwaysExpand?: boolean;
        attributes?: string;
        category?: string;
        conversationalLabel?: string;
        createRoles?: (string | Role)[];
        defaultValue?: string | Type;
        deliveryPlan?: string;
        dependentQuestion?:
            | string
            | ReferenceVariableType<
                keyof Tables,
                string
                | ExplicitKey<string>
                | Record<keyof Tables>,
            >
            | RequestedForVariableType;
        description?: string;
        disableInitialSlotFill?: boolean;
        dotWalkPath?: string;
        exampleText?: string;
        field?: string;
        global?: boolean;
        helpTag?: string;
        helpText?: string;
        instructions?: string;
        layout?: "normal" | "2across" | "2down";
        macro?: string | Record<MacroRefTable> | UiMacro;
        macroponent?: string | Record<MacroponentRefTable>;
        mapToField?: boolean;
        order?: number;
        postInsertScript?: string;
        pricingDetails?: PricingDetail[];
        pricingImplications?: boolean;
        question: string;
        readRoles?: (string | Role)[];
        readScript?: string;
        removeFromConversationalInterfaces?: boolean;
        showHelp?: boolean;
        summaryMacro?: string | Record<SummaryRefTable> | UiMacro;
        tooltip?: string;
        topicBlock?: string | Record<TopicRefTable>;
        unique?: boolean;
        useDynamicDefault?: boolean;
        visibility?: "Bundle" | "Always" | "Standalone";
        visibleBundle?: boolean;
        visibleGuide?: boolean;
        visibleStandalone?: boolean;
        visibleSummary?: boolean;
        widget?: string | SPWidget | Record<WidgetRefTable>;
        width?: 100 | 50 | 25 | 75;
        writeRoles?: (string | Role)[];
    }

    Type Parameters

    Index

    Properties

    __type__?: Type
    $meta?: {
        installMethod?: "first install" | "demo" | "once";
        useEsLatest?: boolean;
    }

    Type Declaration

    • OptionalinstallMethod?: "first install" | "demo" | "once"

      Map a record to an output folder that loads only in specific circumstances. 'first install' -> 'unload' (only loaded when plugin is first registered), 'demo' -> 'unload.demo' (only loaded when demo data is loaded), 'once' -> 'apply_once' (scripts that are only applied once)

    • OptionaluseEsLatest?: boolean

      Controls whether this record's server-side script field(s) run with the latest supported ECMAScript version rather than the application's default. Omit to leave the sys_app/now.config default in place. This setting applies to all fields defined for this entity

    active?: boolean
    alwaysExpand?: boolean

    Always expand

    attributes?: string

    Attributes of the variable

    category?: string

    Category

    conversationalLabel?: string
    createRoles?: (string | Role)[]
    defaultValue?: string | Type
    deliveryPlan?: string

    Delivery plan

    dependentQuestion?:
        | string
        | ReferenceVariableType<
            keyof Tables,
            string
            | ExplicitKey<string>
            | Record<keyof Tables>,
        >
        | RequestedForVariableType

    Dependent question for dynamic default value

    description?: string

    Description

    disableInitialSlotFill?: boolean
    dotWalkPath?: string

    Dot walk path for dynamic default value

    exampleText?: string
    field?: string

    Field to map (required when mapToField is true)

    global?: boolean

    Global

    helpTag?: string
    helpText?: string
    instructions?: string
    layout?: "normal" | "2across" | "2down"

    Layout style for the container

    macro?: string | Record<MacroRefTable> | UiMacro

    Reference to a sys_ui_macro record that renders the variable on Platform UI catalog forms. Pass a UiMacro object from the same project, a Now.ref() reference, or a sys_id string. The macro's Jelly receives the variable context at render time.

    macroponent?: string | Record<MacroponentRefTable>

    Reference to a Next Experience macroponent (sys_ux_macroponent) that renders the variable in UI Builder / Next Experience workspaces.

    mapToField?: boolean

    Map to field

    order?: number

    Order in which the variable appears

    postInsertScript?: string

    Post insert script

    pricingDetails?: PricingDetail[]

    Pricing details

    pricingImplications?: boolean

    Pricing implications

    question: string
    readRoles?: (string | Role)[]
    readScript?: string

    Read script

    removeFromConversationalInterfaces?: boolean

    Remove from Conversational Interfaces

    showHelp?: boolean
    summaryMacro?: string | Record<SummaryRefTable> | UiMacro

    Reference to a sys_ui_macro record that renders a read-only summary of the variable on confirmation and summary pages. Accepts the same reference types as macro. Omit to use the default summary rendering.

    tooltip?: string
    topicBlock?: string | Record<TopicRefTable>

    Reference to a Virtual Agent topic block (sys_cs_topic) used when the catalog item is requested through a conversational interface.

    unique?: boolean

    Unique value

    useDynamicDefault?: boolean

    Use dynamic default

    visibility?: "Bundle" | "Always" | "Standalone"

    Visibility

    visibleBundle?: boolean
    visibleGuide?: boolean

    Indicates whether the variable is visible in guides

    visibleStandalone?: boolean

    Indicates whether the variable is visible when standalone

    visibleSummary?: boolean

    Indicates whether the variable is visible in summaries

    widget?: string | SPWidget | Record<WidgetRefTable>

    Reference to a Service Portal widget (sp_widget) that renders the variable in Service Portal catalog pages. Use when the catalog item is ordered through Service Portal. Accepts a sys_id string, a Record<'sp_widget'>, or an SPWidget() object from the same project.

    width?: 100 | 50 | 25 | 75

    Width of the variable

    writeRoles?: (string | Role)[]