Record Field Interface
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.isMultipleCellValue
to 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
:number
isMultipleCellValue: true
:number[]
Example:
2. Single Line Text Field
- type: singleLineText
- Write type:
string
- Return type:
isMultipleCellValue: false
:string
isMultipleCellValue: true
:string[]
Example:
3. Long Text Field
- type: longText
- Write type:
string
- Return type:
isMultipleCellValue: false
:string
isMultipleCellValue: true
:string[]
Example:
4. Single Select Field
- type: singleSelect
- Write type:
string
(option value) - Return type:
isMultipleCellValue: false
:string
isMultipleCellValue: true
:string[]
Example:
5. Multiple Select Field
- type: multipleSelect
- Write type:
string[]
(array of option values) - Return type:
string[]
Example:
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 }[]
Example:
7. Formula Field
- type: formula
- Write type: Cannot be written directly
- Return type: Depends on formula result, can be
string | number | boolean
or their array forms
Example:
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:
Example:
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
Example:
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)
Example:
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)
Example:
12. Checkbox Field
- type: checkbox
- Write type:
boolean
- Return type:
isMultipleCellValue: false
:boolean
isMultipleCellValue: true
:boolean[]
Example:
13. Rollup Field
- type: rollup
- Write type: Cannot be written directly
- Return type: Depends on rollup configuration, can be
number | string
or their array forms
Example:
14. Rating Field
- type: rating
- Write type:
number
- Return type:
isMultipleCellValue: false
:number
isMultipleCellValue: true
:number[]
Example:
15. Auto Number Field
- type: autoNumber
- Write type: Cannot be written directly
- Return type:
isMultipleCellValue: false
:number
isMultipleCellValue: true
:number[]
Example:
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 }[]
Example:
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 }[]
Example: