Lookup field is not a specific field type. We can look up any type of field from a linked base. The type of a lookup field is determined by the original field in the linked base and has the isLookup property. Lookup fields cannot be edited.
All field return values may have
isMultipleCellValue: true in certain cases:- This occurs when the field is a lookup field. When the linked value allows multiple selections, the lookup field value will necessarily be an array.
-
Fields can be configured - for example, user fields and link fields can be configured as single or multiple selection. In your code, you can use
field.isMultipleCellValueto determine if a field accepts multiple values.
Do not use field type to determine write permissions. Instead, use the isComputed property of the field.
1. Number Field
- type: number
- Write type:
number - Return type:
isMultipleCellValue: false:numberisMultipleCellValue: true:number[]
2. Single Line Text Field
- type: singleLineText
- Write type:
string - Return type:
isMultipleCellValue: false:stringisMultipleCellValue: true:string[]
3. Long Text Field
- type: longText
- Write type:
string - Return type:
isMultipleCellValue: false:stringisMultipleCellValue: true:string[]
4. Single Select Field
- type: singleSelect
- Write type:
string(option value) - Return type:
isMultipleCellValue: false:stringisMultipleCellValue: true:string[]
5. Multiple Select Field
- type: multipleSelect
- Write type:
string[](array of option values) - Return type:
string[]
6. Link Field
- type: link
- Write type:
isMultipleCellValue: false:{ id: string }isMultipleCellValue: true:{ id: string }[]
- Return type:
isMultipleCellValue: false:{ id: string, title?: string }isMultipleCellValue: true:{ id: string, title?: string }[]
7. Formula Field
- type: formula
- Write type: Cannot be written directly
- Return type: Depends on formula result, can be
string | number | booleanor their array forms
8. Attachment Field
To upload an attachment to an attachment field, use the dedicated API. For details, see the Upload Attachment section.- type: attachment
-
Write type:
- Return type:
9. Date Field
- type: date
- Write type:
string(ISO 8601 format) - Return type:
isMultipleCellValue: false:string(ISO 8601 format)isMultipleCellValue: true:string[](ISO 8601 format) You can usenew Date().toISOString()to get the ISO 8601 time format
10. Created Time Field
- type: createdTime
- Write type: Cannot be written directly
- Return type:
isMultipleCellValue: false:string(ISO 8601 format)isMultipleCellValue: true:string[](ISO 8601 format)
11. Last Modified Time Field
- type: lastModifiedTime
- Write type: Cannot be written directly
- Return type:
isMultipleCellValue: false:string(ISO 8601 format)isMultipleCellValue: true:string[](ISO 8601 format)
12. Checkbox Field
- type: checkbox
- Write type:
boolean - Return type:
isMultipleCellValue: false:booleanisMultipleCellValue: true:boolean[]
13. Rollup Field
- type: rollup
- Write type: Cannot be written directly
- Return type: Depends on rollup configuration, can be
number | stringor their array forms
14. Rating Field
- type: rating
- Write type:
number - Return type:
isMultipleCellValue: false:numberisMultipleCellValue: true:number[]
15. Auto Number Field
- type: autoNumber
- Write type: Cannot be written directly
- Return type:
isMultipleCellValue: false:numberisMultipleCellValue: true:number[]
16. User Field
- type: user
- Write type:
isMultipleCellValue: false:{ id: string, title: string }isMultipleCellValue: true:{ id: string, title: string }[]
- Return type:
isMultipleCellValue: false:{ id: string, title: string, email?: string, avatar?: string }isMultipleCellValue: true:{ id: string, title: string, email?: string, avatar?: string }[]
17. Created By Field
- Write type: Cannot be written directly
- Return type:
isMultipleCellValue: false:{ id: string, title: string, email?: string, avatar?: string }isMultipleCellValue: true:{ id: string, title: string, email?: string, avatar?: string }[]Example:
18. Last Modified By Field
- Write type: Cannot be written directly
- Return type:
isMultipleCellValue: false:{ id: string, title: string, email?: string, avatar?: string }isMultipleCellValue: true:{ id: string, title: string, email?: string, avatar?: string }[]