Expression Language Reference
    Preparing search index...

    Interface ImportExpressionContext

    interface ImportExpressionContext {
        $column: string;
        $date: IDateFunctions;
        $excel: FormulaJs;
        $in: InputRecord;
        $lookup: {
            findAccount: (
                this: ExprAppContext,
                name: string,
                byOrOpts?: string | string[] | IFindAccountOpts,
            ) => Promise<string>;
            findClient: (
                this: ExprAppContext,
                value: string,
                options?: IFindClientOpts,
            ) => Promise<ISimpleClient>;
            findClientObject: (
                this: ExprAppContext,
                value: string,
                options?: IFindClientOpts,
            ) => Promise<ISimpleClient>;
            findEntity: (
                this: ExprAppContext,
                name: string,
                opts?: IFindEntityOpts,
            ) => Promise<string>;
            findSecurity: (
                this: ExprAppContext,
                name: string,
                opts?: IFindSecurityOpts,
            ) => Promise<string>;
            queryAccounts: (
                this: ExprAppContext,
                value: AccountSearchValue,
                opts?: QueryAccountOpts,
            ) => Promise<Partial<Accounts>[]>;
            queryDocuments: (
                this: ExprAppContext,
                query: string,
                opts?: QueryDocumentOpts,
            ) => Promise<ApiDocument[]>;
            queryEntities: (
                this: ExprAppContext,
                value: EntitySearchValue,
                opts?: QueryEntityOpts,
            ) => Promise<Partial<Entities>[]>;
            queryEvents: (
                this: ExprAppContext,
                value: EventSearchValue,
                opts?: QueryEventOpts,
            ) => Promise<Partial<Events>[]>;
            queryObservables: (
                this: ExprAppContext,
                type: string,
                opts?: QueryObservableOpts,
            ) => Promise<Observable_Data[]>;
            querySecurities: (
                this: ExprAppContext,
                value: InstrumentSearchValue,
                opts?: QuerySecurityOpts,
            ) => Promise<Partial<Instruments>[]>;
        };
        $number: INumberFunctions;
        $out: Record<string, any>;
        $pending: Record<string, Promise<any>>;
        $placeholders: {
            client_identifier: { adviser: string };
            global_advisor: string;
            global_bank: string;
            global_dealer: string;
            global_exchange: string;
            global_insurer: string;
            global_participant: string;
            primary_entity: string;
        };
        $row_number: number;
        $state: ImportState;
        $stopRequested?: Promise<void>;
        $timing: ITimingFunctions;
        $window: IRowWindowWithMerge;
        BigInt: BigIntConstructor;
        Date: DateConstructor;
        Math: Math;
        Number: NumberConstructor;
        String: StringConstructor;
        $cond(clause1: CondClause, ...clauseN: CondClause): any;
        $if(expr: any, trueValue?: any, falseValue?: any): any;
        $try(expr1: any, expr2?: any, ...exprN: any): any;
        NumberParser(lang?: string): NumberParser;
        [key: string]: any;
    }

    Hierarchy (View Summary)

    Indexable

    • [key: string]: any
    Index

    Properties

    $column: string

    The name of the column currently being computed

    Date Utility functions

    $excel: FormulaJs

    Row object Can be access either by column name $in['<column-name>'] or by column offset $in[1] .. $in[n]

    $lookup: {
        findAccount: (
            this: ExprAppContext,
            name: string,
            byOrOpts?: string | string[] | IFindAccountOpts,
        ) => Promise<string>;
        findClient: (
            this: ExprAppContext,
            value: string,
            options?: IFindClientOpts,
        ) => Promise<ISimpleClient>;
        findClientObject: (
            this: ExprAppContext,
            value: string,
            options?: IFindClientOpts,
        ) => Promise<ISimpleClient>;
        findEntity: (
            this: ExprAppContext,
            name: string,
            opts?: IFindEntityOpts,
        ) => Promise<string>;
        findSecurity: (
            this: ExprAppContext,
            name: string,
            opts?: IFindSecurityOpts,
        ) => Promise<string>;
        queryAccounts: (
            this: ExprAppContext,
            value: AccountSearchValue,
            opts?: QueryAccountOpts,
        ) => Promise<Partial<Accounts>[]>;
        queryDocuments: (
            this: ExprAppContext,
            query: string,
            opts?: QueryDocumentOpts,
        ) => Promise<ApiDocument[]>;
        queryEntities: (
            this: ExprAppContext,
            value: EntitySearchValue,
            opts?: QueryEntityOpts,
        ) => Promise<Partial<Entities>[]>;
        queryEvents: (
            this: ExprAppContext,
            value: EventSearchValue,
            opts?: QueryEventOpts,
        ) => Promise<Partial<Events>[]>;
        queryObservables: (
            this: ExprAppContext,
            type: string,
            opts?: QueryObservableOpts,
        ) => Promise<Observable_Data[]>;
        querySecurities: (
            this: ExprAppContext,
            value: InstrumentSearchValue,
            opts?: QuerySecurityOpts,
        ) => Promise<Partial<Instruments>[]>;
    }

    Lookup Utility Functions LOOKUP_FUNCS

    Type declaration

    Number utility functions

    $out: Record<string, any>

    Output Row Object $out[string|number] allows access to another columns output

    $pending: Record<string, Promise<any>>

    Allow access to the pending output value of a particular column

    $placeholders: {
        client_identifier: { adviser: string };
        global_advisor: string;
        global_bank: string;
        global_dealer: string;
        global_exchange: string;
        global_insurer: string;
        global_participant: string;
        primary_entity: string;
    }

    Type declaration

    • client_identifier: { adviser: string }

      Placeholder Values for Client Identifier

      • adviser: string

        Placeholder that will resolve to the universe of the adviser,running the import process

    • global_advisor: string
    • global_bank: string
    • global_dealer: string

      Placeholder that is resolved to the UUID of the global dealer entity

    • global_exchange: string

      Placeholder that will be resolved to the UUID of the global exchange entity

    • global_insurer: string
    • global_participant: string

      Placeholder that will be resolved to the UUID of the global participant entity

    • primary_entity: string

      Placeholder that is resolved to the UUID for the primary entity of the universe performing this import

    $row_number: number

    Row Number of current row

    $state: ImportState

    The Importer State

    $stopRequested?: Promise<void>

    Promise that completes when the current run is complete or stopped

    BigInt: BigIntConstructor

    Standard javascript Date object global.BigInt

    Date: DateConstructor

    Standard javascript Date object global.Date

    Math: Math

    Standard javascript Math object global.Math

    Number: NumberConstructor

    Standard javascript Number object global.Number

    String: StringConstructor

    Standard javscript String object global.String

    Methods

    • Evaluate and return the condValueExpr for the first matching condExpr. This function works like a switch statement. Each argument is tested in order and and the first clause with a condExpr component that is truthy will result in the condValueExpr being returned. If no expression are valid the result is undefined. All parameters are evaluated lazily

      Parameters

      Returns any

    • Evaluate expr and return trueValue if it is true and falseValue otherwise Parameters are evaluated lazily so only one of trueValue|falseValue will be evaluated

      Parameters

      • expr: any

        conditional Expression to evaluate

      • OptionaltrueValue: any

        expression to evaluate if expr is truthy

      • OptionalfalseValue: any

        expression to evaluate if expr is falsy

      Returns any

    • Evaluate expression in sequence and return the first expression that does not throw an exception.

      Parameters are evaluated lazily

      Parameters

      • expr1: any

        first Expression

      • Optionalexpr2: any

        second expression

      • ...exprN: any

        Nth expression

      Returns any

      undefined if all expressions throw exceptions