Skip to main content

Record

model/record.Record

Datasheet row operations and information.

Get the rows record, you can use useRecord (querying single record data), useRecords (batch query of record data)

Methods

getCellValue

getCellValue(fieldId): any

Gets the cell value of the given field for this record.

Parameters

NameTypeDescription
fieldIdstringThe field ID whose cell value you'd like to get.

Returns

any

Example

const cellValue = myRecord.getCellValue(mySingleLineTextFieldId);
console.log(cellValue);
// => 'cell value'

getCellValueString

getCellValueString(fieldId): null | string

Gets the cell value of the given field of record, and convert to string type.

Parameters

NameType
fieldIdstring

Returns

null | string

Example

const stringValue = myRecord.getCellValueString(myNumberFieldId);
console.log(stringValue);
// => '42'

url

url(viewId?): string

The URL address of the record, which you can access in your browser, opens the Wiggle Table interface and locates the record

Parameters

NameType
viewId?string

Returns

string

Accessors

id

get id(): string

The ID for this record.

Returns

string


title

get title(): null | string

The primary cell value in this record, formatted as a string.

Returns

null | string

Example

console.log(myRecord.title);
// => '42'

commentCount

get commentCount(): number

The number of comments on this record.

Returns

number