Skip to content

Context

When the script runs, the context object provides the context. The usage is as follows.

currentTable

Returns the name of the currently selected table.

base.context.currentTable

Example

const name = base.context.currentTable
output.text(`The name of the current table is: ${name}`)

currentRow

Returns the currently selected row and returns the complete row object including _id, _mtime, _ctime. If no row is selected, this function returns undefined.

base.context.currentRow

Example

const row = base.context.currentRow
output.text(row)