Model class representing a record in a table.
Do not instantiate. You can get instances of this class by calling table.selectRecords
or view.selectRecords
and using the resulting RecordQueryResult.
Press shift + S to search API reference.
Model class representing a record in a table.
Do not instantiate. You can get instances of this class by calling table.selectRecords
or view.selectRecords
and using the resulting RecordQueryResult.
class Record extends AbstractModel<RecordData, WatchableRecordKey>
readonly commentCount | number The number of comments on this record.
| ||||||
readonly createdTime | Date The created time of this record.
| ||||||
readonly id | string The ID for this model. | ||||||
readonly isDeleted | boolean
In general, it's best to avoid keeping a reference to an object past the
current event loop, since it may be deleted and trying to access any data
of a deleted object (other than its ID) will throw. But if you keep a
reference, you can use | ||||||
readonly name | string The primary cell value in this record, formatted as a
| ||||||
readonly url | string The URL for the record. You can visit this URL in the browser to be taken to the record in the Airtable UI.
| ||||||
getAttachmentClientUrlFromCellValueUrl | function (attachmentId: string, attachmentUrl: string) => string
Returns a URL that is suitable for rendering an attachment on the current client. The URL that is returned will only work for the current user.
| ||||||
getCellValue | Gets the cell value of the given field for this record.
| ||||||
getCellValueAsString | Gets the cell value of the given field for this record, formatted as a
| ||||||
getColorHexInView | function (viewOrViewIdOrViewName: View | string) => string | null
Gets the CSS hex string for this record in a given view, or null if the record has no color in that view. Can be watched with the 'colorInView:${ViewId}' key. | ||||||
getColorInView | Gets the color of this record in a given view, or null if the record has no color in that view. Can be watched with the 'colorInView:${ViewId}' key. | ||||||
selectLinkedRecordsFromCell | function (fieldOrFieldIdOrFieldName: Field | FieldId | string, opts: RecordQueryResultOpts = {}) => LinkedRecordsQueryResult
Select records referenced in a | ||||||
selectLinkedRecordsFromCellAsync | function (fieldOrFieldIdOrFieldName: Field | FieldId | string, opts: RecordQueryResultOpts = {}) => Promise<LinkedRecordsQueryResult>
Select and load records referenced in a Remember to call | ||||||
toString | function () => string A string representation of the model for use in debugging. | ||||||
unwatch | function (keys: WatchableRecordKey | ReadonlyArray<WatchableRecordKey>, callback:
Unwatch keys watched with Should be called with the same arguments given to Returns the array of keys that were unwatched. | ||||||
watch | function (keys: WatchableRecordKey | ReadonlyArray<WatchableRecordKey>, callback:
Get notified of changes to the model. Every call to Returns the array of keys that were watched. |