QuickBase JS SDK v2 - v2.2.2
    Preparing search index...

    Interface CreateRelationshipRequest

    interface CreateRelationshipRequest {
        foreignKeyField?: { label?: string; [key: string]: unknown };
        lookupFieldIds?: number[];
        parentTableId: string;
        summaryFields?: {
            accumulationType:
                | "AVG"
                | "SUM"
                | "MAX"
                | "MIN"
                | "STD-DEV"
                | "COUNT"
                | "COMBINED-TEXT"
                | "COMBINED-USER"
                | "DISTINCT-COUNT";
            label?: string;
            summaryFid?: number;
            where?: string;
            [key: string]: unknown;
        }[];
    }
    Index

    Properties

    foreignKeyField?: { label?: string; [key: string]: unknown }

    This property is optional. If it is not provided, the foreign key field will be created with the label ‘Related ’, where is the name of a record in the parent table.

    Type Declaration

    • [key: string]: unknown
    • Optionallabel?: string

      The label for the foreign key field.

    lookupFieldIds?: number[]

    Array of field ids in the parent table that will become lookup fields in the child table.

    parentTableId: string

    The parent table id for the relationship.

    summaryFields?: {
        accumulationType:
            | "AVG"
            | "SUM"
            | "MAX"
            | "MIN"
            | "STD-DEV"
            | "COUNT"
            | "COMBINED-TEXT"
            | "COMBINED-USER"
            | "DISTINCT-COUNT";
        label?: string;
        summaryFid?: number;
        where?: string;
        [key: string]: unknown;
    }[]

    Array of summary field objects which will turn into summary fields in the parent table. When you specify the 'COUNT' accumulation type, you have to specify 0 as the summaryFid (or not set it in the request). 'DISTINCT-COUNT' requires that summaryFid be set to an actual fid.

    Type Declaration

    • [key: string]: unknown
    • accumulationType:
          | "AVG"
          | "SUM"
          | "MAX"
          | "MIN"
          | "STD-DEV"
          | "COUNT"
          | "COMBINED-TEXT"
          | "COMBINED-USER"
          | "DISTINCT-COUNT"

      The accumulation type for the summary field.

    • Optionallabel?: string

      The label for the summary field.

    • OptionalsummaryFid?: number

      The field id to summarize.

    • Optionalwhere?: string

      The filter, using the Quickbase query language, which determines the records to return.