@servicenow/sdk - v4.4.1
    Preparing search index...
    dataPill: <T>(_expression: T, _type: FlowDataType) => DataPillReturn<T> = dataPillAlias

    Type Declaration

      • <T>(_expression: T, _type: FlowDataType): DataPillReturn<T>
      • Wrapper function for datapill expressions that provides type information. This function wraps PropertyAccess expressions and associates them with their data type for proper serialization to Flow Designer XML format.

        At runtime, this function is a passthrough that returns the expression unchanged. The type information is used at compile/build time by the build plugins.

        Special handling: TableAwareRecord types from OutputsWithDotwalk are accepted without strict type checking, as they represent expanded reference types with dotwalk support.

        Type Parameters

        • T

          The type of the expression being wrapped

        Parameters

        • _expression: T

          The datapill expression (e.g., params.trigger.current.active)

        • _type: FlowDataType

          The data type of the datapill value

        Returns DataPillReturn<T>

        The same expression (passthrough at runtime)

        // Boolean trigger field
        wfa.dataPill(params.trigger.current.active, 'boolean')

        // String flow variable
        wfa.dataPill(params.flowVariables.userName, 'string')

        // Reference field with dot-walking
        wfa.dataPill(params.trigger.current.assigned_to.email, 'string')

        // Reference field with TableAwareRecord (from OutputsWithDotwalk)
        wfa.dataPill(params.flowVariables.userRef, 'reference')

        // Action output reference
        wfa.dataPill(createIncident.record, 'reference')

        // In template literals
        `Hello ${wfa.dataPill(params.flowVariables.userName, 'string')}`