Skip to main content

fields

The data structure of the fields is as follows.

PropertiesDescription
id

string, field ID

Example values: fldsRHWJZwFcM
name

string, field name

Example values: Order number
type

string, Field types, possible values are listed in the section Field Types and Attributes

Example values: SingleText
editable

boolean, Field permissions, i.e. column permissions, true for editable, false for read-only

Example values: true
property

object,Field attributes.Different fields have different attributes, see the section Field Types and Attributes for details on the attributes of various fields

Example values: {"defaultValue":"To be added"}
isPrimary

boolean, Is the primary field

Example values: true
desc

string, Field descriptions, i.e. column descriptions

Example values: This column is the automatic generation of the single number, do not manually modify

Field Types and Attributes

AITable currently has the following field types.

The type of field returned by the interfaceThe type of the corresponding field
SingleTextsingle-line text
TextMulti-line text
SingleSelectSingle choice
MultiSelectMultiple choice
NumberNumber
CurrencyCurrency
PercentPercentage
DateTimeDatetime
AttachmentAttachment
MemberMember
CheckboxCheck
RatingRating
URLWebsite
PhoneA telephone number.
EmailEmail
WorkDocWorkDoc
OneWayLinkOne-way link
TwoWayLinkTwo-way link
MagicLookUpMagicLookUp
FormulaIntelligent formula
AutoNumberAutoincrement number
CreatedTimeCreate Timestamp
LastModifiedTimeModify Timestamp
CreatedByCreated by
LastModifiedByUpdated by
ButtonButton

The following section describes the properties of each field type in detail.

When the "Get Field" interface is called, the following results are returned for each field type.

SingleText

Return a sample fragment of the result (containing only field types and attributes).

{
"type": "SingleText",
"property": {
"defaultValue": ""
}
}
Field PropertiesData TypeDescription
defaultValuestringWhen creating a new record, the default value of the corresponding cell of this field, the default is empty

Text

No field properties are available at this time.

SingleSelect

Return a sample fragment of the result (containing only field types and attributes).

{
"type": "SingleSelect",
"property": {
"options": [
{
"id": "optpTVSGk0R2M",
"name": "Elevit",
"color": {
"name": "indigo_4",
"value": "#5586FF"
}
},
{
"id": "optqX2Bw479FG",
"name": "OAD",
"color": {
"name": "blue_4",
"value": "#55CDFF"
}
}
]
}
}
Field PropertiesData TypeDescription
optionsobject arraysList of all available options

Description of the parameters contained under options.

ParametersData TypeDescription
idstringoption ID
namestringoption name
colorobjectThe color of the option, including the name and value of the color

MultiSelect

The field properties are the same as the radio selection.

Number

Return a sample fragment of the result (containing only field types and attributes).

{
"type": "Number",
"property": {
"defaultValue": "2",
"precision": 0,
"commaStyle": ",",
"symbol": "Square meters"
}
}
Field PropertiesData TypeDescription
defaultValuestringThe default value for this field when creating a new record, default is empty.
precisionnumberIndicates the number of decimal places, i.e., the precision of the number.The values are 0 (for integers), 1 (to one decimal place), 2 (to two decimal places), 3 (to three decimal places), 4 (to four decimal places)
commaStylestringThousand separator, set this property to separate thousands of digits by a comma, such as 1,000.default is empty (optional)
symbolstringnumeric units, displayed to the right of the number, default is null (optional)

Currency

Return a sample fragment of the result (containing only field types and attributes).

{
"type": "Currency",
"property": {
"defaultValue": "1000.00",
"precision": 2,
"symbol": "¥",
"symbolAlign": "Default"
}
}
Field PropertiesData TypeDescription
defaultValuestringThe default value for this field when creating a new record, the default is null.
precisionnumberIndicates the number of decimal places, i.e., the precision of the number.The values are 0 (for integers), 1 (to one decimal place), 2 (to two decimal places), 3 (to three decimal places), 4 (to four decimal places)
symbolstringcurrency symbol, can be any custom character
symbolAlignstringcurrency symbol (optional).The default value is Default (the currency unit is immediately to the left of the value), other values are Left (the currency unit is fixed to the left), Right (the currency unit is fixed to the right).

Percent

Return a sample fragment of the result (containing only field types and attributes).

{
"type": "Percent",
"property": {
"defaultValue": "0.85",
"precision": 1
}
}
Field PropertiesData TypeDescription
defaultValuestringThe default value of the cell corresponding to this field when creating a new record, the default is empty.
precisionnumberIndicates the number of decimal places to convert the field value to a percentage, i.e., the percentage precision.The values are 0 (for integers), 1 (to one decimal place), 2 (to two decimal places), 3 (to three decimal places), 4 (to four decimal places).For example, if the field value is 0.22, it will be displayed as 22% if the percentage precision is 0. If the percentage precision is 1, it will be displayed as 22.0%

Datetime

Return a sample fragment of the result (containing only field types and attributes).

{
"type": "DateTime",
"property": {
"dateFormat": "YYYY/MM/DD hh:mm",
"includeTime": true,
"timeFormat": "hh:mm",
"autoFill": true,
"timeZone": "Asia/Hongkong",
"includeTimeZone": true
}
}
Field PropertiesData TypeDescription
dateFormatstring(enum)*YYYY/MM/DD, YYYY-MM-DD, DD/MM/YYYY, YYYY-MM, MM-DD, YYYY, MM, DD
includeTimeBooleanWhether to display the time
timeFormatstring(enum)HH:mm, hh:mm
autoFillBooleanWhether to auto-fill the time when creating a new record
timeZoneStringTime zone
includeTimeZoneBooleanWhether to display time zone

The value of the date field returns timestamp without restricted format.The format information in the field property can be used for formatting, see dayjs format for the meaning.

If you don't want to handle date formatting and want the returned result to be consistent with the view display, you can assign cellFormat to string in the interface request parameters, and all the returned content will be a string.

For available values for timeZone property, please refer to List of Time Zones. Example: Asia/Shanghai

Attachment

No field properties are available at this time.

Member

Return a sample fragment of the result (containing only field types and attributes).

{
"type": "Member",
"property": {
"isMulti": true,
"shouldSendMsg": true
}
}
Field PropertiesData TypeDescription
isMultiBooleanIf or not multiple members can be selected
shouldSendMsgBooleanWhether to send an in-site message to a member when it is mentioned in the member column

Description of the parameters contained under options.

ParametersData TypeDescription
idStringThe user's organizational unit id (different from the actual user id) on the current space, hereafter referred to as the member id. e. g.Bob's member id on space A is different from his member id on space B
nameStringmember name
typeStringmember type, including Member (for users with physical accounts) and Team (for organizational units in the space, such as departments, groups, etc.)
avatarStringURL of the member's avatar

Checkbox

Return a sample fragment of the result (containing only field types and attributes).

{
"type": "Checkbox",
"property": {
"icon": "white_check_mark"
}
}
Field PropertiesData TypeDescription
iconstring(enum)Please refer to Expression Pack Enumeration

Rating

Return a sample fragment of the result (containing only field types and attributes).

{
"type": "Rating",
"property": {
"icon": "star",
"max": 5
}
}
Field PropertiesData TypeDescription
iconstring(enum)Please refer to Expression Pack Enumeration
maxNumberThe maximum value of the rating, from 1-10

URL

No field properties are available at this time.

Phone

No field properties are available at this time.

Email

No field properties are available at this time.

WorkDoc

No field properties are available at this time.

Two datasheets A and B are connected by a link field, and there will be an association field in A that is associated with B.

Return a sample fragment of the result (containing only field types and attributes).

{
"type": "OneWayLink",
"property": {
"foreignDatasheetId": "dstgr2YN264s7CXKVs",
"limitToViewId": "viwY4B8pmiMoi",
"limitSingleRecord": true
}
}
Field PropertiesData TypeDescription
foreignDatasheetIdStringRelated datasheet ID
limitSingleRecordBooleanWhether to select only a single record
limitToViewIdStringSpecifies a view of the associated datasheet, limiting the selection to the records under that view

Two datasheets A and B are connected by a link field, and there will be an association field in A that is associated with B, and a link field in B that is associated with A.This pair of related fields is called a brother field.

Return a sample fragment of the result (containing only field types and attributes).

{
"type": "TwoWayLink",
"property": {
"foreignDatasheetId": "dstgr2YN264s7CXKVs",
"brotherFieldId": "fldxxxxxxxx",
"limitToViewId": "viwY4B8pmiMoi",
"limitSingleRecord": true
}
}
Field PropertiesData TypeDescription
foreignDatasheetIdStringRelated datasheet ID
brotherFieldIdStringRelated field ID
limitSingleRecordBooleanWhether to select only a single record
limitToViewIdStringSpecifies a view of the associated datasheet, limiting the selection to the records under that view

MagicLookUp

The MagicLookUp field is a field attached to a OneWayLink or TwoWayLink field. It is a dynamic computed field, and the cell itself does not store any value.

Return a sample fragment of the result (containing only field types and attributes).

{
"type": "MagicLookUp",
"property": {
"relatedLinkFieldId": "fldhBGpM3ylTq",
"targetFieldId": "fldS2mgS18LE1",
"rollupFunction": "VALUES",
"valueType": "Array",
"entityField": {
"datasheetId": "dstgr2YN264s7CXKVs",
"field": {
"id": "fldS2mgS18LE1",
"name": "title",
"type": "SingleText",
"property": {
"defaultValue": ""
},
"editable": true
}
},
"enableFilterSort": true,
"sortInfo": {
"rules": [
{
"fieldId": "fld7aautAK1h",
"desc": false
}
]
},
"filterInfo": {
"conjunction": "and",
"conditions": [
{
"fieldId": "fldL74kjFHak",
"fieldType": "Number",
"operator": "isGreater",
"value": [13]
}
]
},
"lookUpLimit": "ALL"
}
}
Field PropertiesData TypeDescription
relatedLinkFieldIdStringThe associated field ID of the referenced current datasheet
targetFieldIdStringthe field ID of the queried field in the associated datasheet
hasErrorBooleanWhen a lookup dependent associated field is deleted or converted, the referenced value may not be retrieved properly
entityFieldObjectThe entity fields are finally referenced, excluding MagicLoopUp fields.If an error exists, the entity field may not exist.
rollupFunctionStringaggregate function
valueTypeStringReturn value type, including String, Boolean, Number, DateTime, Array
formatObjectReturns the result of a number or date formatting operation when the return value is of type Number or DateTime
  • Description of the rollupFunction values refer to Lookup Product Manual for the meaning of the parameters.

    Function NameReturn Value TypeDescription
    VALUESarrayOriginal values
    AVERAGEnumberaverage
    COUNTnumbernon-null count
    COUNTAnumbernon-null value count
    COUNTALLnumberfull count
    SUMnumberTotal
    MINnumber/datetimeminimum
    MAXnumber/datetimemaximum
    ANDbooleanand operation
    ORbooleanor operation
    XORbooleaneXclusive OR operation
    CONCATENATEstringconcatenate to text
    ARRAYJOINstringcomma-join
    ARRAYUNIQUEarrayDeduplication
    ARRAYCOMPACTarrayfilter all null values
  • Description of the parameters contained under entityField.

    ParametersData TypeDescription
    datasheetIdStringthe datasheet ID of the entity field
    fieldObjectA Field object other than LookUp, a MagicLookUp can refer to a field of a MagicLookUp type from another datasheet, but ultimately an entity field will exist.

    Note: If you use this field feature in your application, you will need to handle exceptions when a reference error is detected for the field.

  • The parameters included under format are described below.

    ParametersData TypeDescription
    typeStringformatting type DateTime, Number, Percent, Currency
    formatObjectThe specific format of the different formatting types

    Formatted as date.

    ParametersData TypeDescription
    dateFormatStringDate format, e.g. YYYY/MM/DD
    timeFormatStringTime format, e.g. hh:mm, HH:mm
    includeTimeBooleanWhether to display the time
    timeZoneStringTime zone
    includeTimeZoneBooleanWhether to display time zone

    Formatted as a number or percentage:

    ParametersData TypeDescription
    precisionNumbernumeric precision or percentage precision

    Formatted as currency:

    ParametersData TypeDescription
    precisionNumberPrecision
    symbolStringcurrency symbol
  • Explanation of parameters contained in sortInfo:

    ParametersData TypeDescription
    rulesarrayAn array of sorting rules. Currently, only one sorting rule can be specified (the array can only have one element).

    Explanation of parameters contained in the rules array:

    ParametersData TypeDescription
    fieldIdstringThe ID of the field used for sorting.
    descbooleanWhether to sort in descending order.
  • Explanation of parameters contained in filterInfo:

    ParametersData TypeDescription
    conjunctionstringCombination mode of filter conditions: and requires all filter conditions to be met; or requires any one filter condition to be met.
    conditionsarrayArray of filter conditions

    Explanation of parameters contained in conditions:

    ParametersData TypeDescription
    fieldIdstringField ID of the filter field
    fieldTypestringField type of the filter field
    operatorstringOperator of the filter condition. See the table below for available values.
    valuearrayReference value of the filter condition. For example, if the filter condition is "greater than 3", the reference value is 3, and the value would be [3].

    Explanation of possible values for operator:

    ValueDescription
    isFilters the field whose value is equal to the reference value
    isNotFilters the field whose value is not equal to the reference value
    containsFilters the field whose value contains the reference value
    doesNotContainFilters the field whose value does not contain the reference value
    isEmptyFilters the field whose value is empty
    isNotEmptyFilters the field whose value is not empty
    isGreaterFilters the field whose value is greater than the reference value
    isGreaterEqualFilters the field whose value is greater than or equal to the reference value
    isLessFilters the field whose value is less than the reference value
    isLessEqualFilters the field whose value is less than or equal to the reference value
    isRepeatFilters the field whose value contains duplicate items
  • Explanation of possible values for lookUpLimit:

    ValueDescription
    ALLDisplays all referenced record values.
    FIRSTDisplays only the first referenced record value.

Formula

Return a sample fragment of the result (containing only field types and attributes).

{
"type": "Formula",
"property": {
"expression": "",
"valueType": "String",
"hasError": false
}
}
Field PropertiesData TypeDescription
expressionstring*formula expression
valueTypestring(enum)*Return value type, including String, Boolean, Number, DateTime, Array
hasErrorbooleanThe calculated value may not be retrieved properly when the relevant field dependent on the formula is deleted or converted.
formatobjectWhen the return value is of type Number or DateTime, it returns a number or date formatted in the same format as the lookup.

Same as magiclookup, exceptions need to be handled when errors are encountered.

AutoNumber

DescriptionNo field properties are available at this time.

CreatedTime

Same as DateTime.

LastModifiedTime

Same as DateTime.

CreatedBy

The member id is at the space level and the creator id is at the account level.

Return a sample fragment of the result (containing only field types and attributes).

{
"type": "CreatedBy",
"property": {
"options": [
{
"id": "e9cbc839fd1b49be85b1f7b0977047e2",
"name": "Coco",
"avatar": "https://s1.aitable.ai/default/avatar004.jpg"
}
]
}
}
Field PropertiesData TypeDescription
optionsoption[]Members whose fields have been selected by the current member

Description of the parameters contained under options.

ParametersData TypeDescription
idstring*user id
namestring*user nickname
avatarstring*URL of user avatar

LastModifiedBy

Return a sample fragment of the result (containing only field types and attributes).

{
"type": "LastModifiedBy",
"property": {
"options": [
{
"id": "e9cbc839fd1b49be85b1f7b0977047e2",
"name": "Coco",
"avatar": "https://s1.aitable.ai/default/avatar004.jpg"
}
]
}
}
Field PropertiesData TypeDescription
optionsoption[]Current field stored users

Description of the parameters contained under options.

ParametersData TypeDescription
idstring*user id
namestring*user nickname
avatarstring*URL of user avatar

Button

Return a sample fragment of the result (containing only field types and attributes).

{
"id": "fldb6L4FznMbZ",
"name": "Button",
"type": "Button",
"property": {
"text": "Click to start",
"style": {
"type": "Background",
"color": {
"name": "deepPurple_5",
"value": "#B0A4F5"
}
},
"action": {
"type": "openLink",
"openLink": {
"type": "Url",
"expression": "https://aitable.ai"
}
}
},
"editable": false
}
Field PropertiesData TypeDescription
textStringButton text
styleObjectButton style
actionObjectButton action
  • Explanation of parameters contained in style:
ParametersData TypeDescription
typeStringButton style type: Background, OnlyText. \n Default is Background
colorObjectButton style color
  • Explanation of parameters contained in color:
ParametersData TypeDescription
nameStringColor name, see the name of color value list for details
valueStringColor value, not required. See the name of color value list for details
  • Explanation of parameters contained in action:
ParametersData TypeDescription
typeStringButton action type: OpenLink, TriggerAutomation. Currently only OpenLink support for now in the API
openLinkObjectClick to open a link
  • Explanation of parameters contained in openLink:
ParametersData TypeDescription
typeStringLink type: Url, Expression
expressionStringPure url or The expression of the url