EasyFM - v5.0.0-beta.8
    Preparing search index...

    Interface BaseField<T, API_FIELD_RESULT>Abstract

    A class representing a field in a record. API_FIELD_RESULT defines the value of field.metadata.result for the abstracted field type

    interface BaseField<
        T extends unknown,
        API_FIELD_RESULT extends FieldResultTypes,
    > {
        _value: T;
        id: string;
        parent: Parentable;
        get metadata(): {
            autoEnter: boolean;
            displayType: | "calendar"
            | "editText"
            | "popupList"
            | "popupMenu"
            | "checkBox"
            | "radioButtons"
            | "selectionList"
            | "secureText";
            fourDigitYear: boolean;
            global: boolean;
            maxCharacters: number;
            maxRepeat: number;
            name: string;
            notEmpty: boolean;
            numeric: boolean;
            repetitionEnd: number;
            repetitionStart: number;
            result: | "number"
            | "time"
            | "container"
            | "text"
            | "invalid"
            | "date"
            | "timeStamp";
            timeOfDay: boolean;
            type: "normal"
            | "summary"
            | "invalid"
            | "calculation";
            valueList?: string;
        } & { result: API_FIELD_RESULT };
        get value(): T;
        isCalculationField(): boolean;
        isSummaryField(): boolean;
        parseRawValue(value: RawValueData): T;
        serializeRawValue(): RawValueData;
        updateFromRawValue(value: RawValueData): void;
    }

    Type Parameters

    • T extends unknown

      The type of the field value.

    • API_FIELD_RESULT extends FieldResultTypes

    Hierarchy (View Summary)

    Index
    _value: T
    id: string
    parent: Parentable
    • get metadata(): {
          autoEnter: boolean;
          displayType: | "calendar"
          | "editText"
          | "popupList"
          | "popupMenu"
          | "checkBox"
          | "radioButtons"
          | "selectionList"
          | "secureText";
          fourDigitYear: boolean;
          global: boolean;
          maxCharacters: number;
          maxRepeat: number;
          name: string;
          notEmpty: boolean;
          numeric: boolean;
          repetitionEnd: number;
          repetitionStart: number;
          result: | "number"
          | "time"
          | "container"
          | "text"
          | "invalid"
          | "date"
          | "timeStamp";
          timeOfDay: boolean;
          type: "normal"
          | "summary"
          | "invalid"
          | "calculation";
          valueList?: string;
      } & { result: API_FIELD_RESULT }

      Returns the FileMaker metadata for this field.

      Returns {
          autoEnter: boolean;
          displayType:
              | "calendar"
              | "editText"
              | "popupList"
              | "popupMenu"
              | "checkBox"
              | "radioButtons"
              | "selectionList"
              | "secureText";
          fourDigitYear: boolean;
          global: boolean;
          maxCharacters: number;
          maxRepeat: number;
          name: string;
          notEmpty: boolean;
          numeric: boolean;
          repetitionEnd: number;
          repetitionStart: number;
          result: | "number"
          | "time"
          | "container"
          | "text"
          | "invalid"
          | "date"
          | "timeStamp";
          timeOfDay: boolean;
          type: "normal"
          | "summary"
          | "invalid"
          | "calculation";
          valueList?: string;
      } & { result: API_FIELD_RESULT }

    • Takes in data in the format that FileMaker gives us and converts it to a more JavaScript-friendly format. This method is intended to be overriden.

      Parameters

      • value: RawValueData

      Returns T