Field: {
    allows_multiple: boolean;
    enrichment_source:
        | string
        | Branded<string, "none">
        | Branded<string, "crunchbase">
        | Branded<string, "dealroom">
        | Branded<string, "affinity-data">;
    id: number;
    list_id: number | null;
    name: string;
    track_changes: boolean;
    value_type: FieldValueType;
} & ({
    dropdown_options: DropdownOption[];
    value_type: RANKED_DROPDOWN;
} | {
    dropdown_options: never[];
    value_type: Exclude<FieldValueType, RANKED_DROPDOWN>;
})

Represents a field in a list.

Each field object has a unique id. It also has a name, which determines the name of the field, and allows_multiple, which determines whether multiple values can be added to a single cell for that field.

Affinity is extremely flexible and customizable, and a lot of that power comes from our ability to support many different value types for fields. Numbers, dates, and locations are all examples of value types, and you can search, sort, or filter all of them.

Type declaration

  • allows_multiple: boolean

    This determines whether multiple values can be added to a single cell for the field.

  • enrichment_source:
        | string
        | Branded<string, "none">
        | Branded<string, "crunchbase">
        | Branded<string, "dealroom">
        | Branded<string, "affinity-data">

    The data source for the enriched field. Will appear as none for custom fields and certain list-specific fields (e.g. Status). Fields auto-created for certain integrations will also be called out here (e.g. Mailchimp).

    TODO(@joscha): This is currently modeled as a string, but should probably be an enum. Going by this there should possibly also be a "pitchbook" value.

  • id: number

    The unique identifier of the field object.

  • list_id: number | null

    The unique identifier of the list that the field object belongs to if it is specific to a list. This is null if the field is global.

  • name: string

    The name of the field.

  • track_changes: boolean

    Whether this field supports historical tracking. See FieldValueChanges for more information.

  • value_type: FieldValueType

    This field describes what values can be associated with the field. This can be one of many values, as described in the table below.