Skip to content

Context

When the script runs, the context object context-related elements. The usage is as follows.

currentTable

Currently selected table.

base.context.currentTable;

Output The name of the currently selected table

Example

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

currentRow

Currently selected row. If the script is launched from a button click, this is the row on which the button was clicked.

base.context.currentRow;

Output Complete row object, including _id, _mtime, _ctime. If no row is selected, this function returns undefined.

Example

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