Scripting Features¶
These features are only available when running JavaScript scripts inside SeaTable. They provide access to the browser context, output functions, and utility helpers.
Context¶
The base.context object provides information about the current user interaction.
currentRow
The current row when the script is triggered via a button. Contains the full row data.
Warning
currentRow is only available when the script is executed via a button column. When running manually, currentRow is undefined.
Output¶
The output object displays results in the script output panel.
output.text
Display text or any variable in the output panel. Accepts strings, numbers, objects, and arrays.
Example
output.markdown
Display markdown-formatted content in the output panel.
Example
Utilities¶
The base.utils object provides helper functions.
formatDate
Format a date object to YYYY-MM-DD.
Example
formatDateWithMinutes
Format a date object to YYYY-MM-DD HH:mm.
Example