Methods This is a list of all available objects and methods in SeaTable you can use in the plugin development.
For a more detailed description of the used parameters, refer to the data model at the SeaTable API Reference .
Common Base represents a table in SeaTable. The base object provide a way to read, manipulate and output data in/from your base. The following methods are available.
Users getRelatedUsers Get other users associated with the current base (collaborators of the table, the shared person of the table, etc.)
Example
const collaborators = dtable . getRelatedUsers ();
getCollaboratorsName Get a list of names of collaborators
dtable . getCollaboratorsName ( collaborators , value )
Arguments collaborators: collaborator list in this base value: email list of collaborators Example
const collaborators = dtable . getRelatedUsers ();
const value = [ 'abc@seafile.com' , 'shun@seafile.com' ];
const name = dtable . getCollaboratorsName ( collaborators , value ); // 'abc, shun'
Views getViewRowsColor Get the color attributes of the row data in the view
dtable . getViewRowsColor ( rows , view , table )
Arguments
rows: the rows of the color attribute view: view object table: table object Example
const tableName = 'tableName' ;
const viewName = 'viewName' ;
const table = dtable . getTableByName ( tableName );
const view = dtable . getViewByName ( table , viewName );
const rows = dtable . getViewRows ( view , table );
const rowsColor = dtable . getViewRowsColor ( rows , view , table );
Output getTableFormulaResults Get the data in the calculation formula column of the table
dtable . getTableFormulaResults ( table , rows )
Arguments
table: table object rows: row data of the relevant data of the calculation formula column Example
const tableName = 'tableName' ;
const viewName = 'viewName' ;
const table = dtable . getTableByName ( tableName );
const view = dtable . getViewByName ( table , viewName );
const rows = dtable . getViewRows ( view , table );
const formulaResult = dtable . getTableFormulaResults ( table , rows );
getLinkCellValue Get a list of names of collaborators
Example
getLinkDisplayString Get a list of names of collaborators
Example
getLinkDisplayString Get a list of names of collaborators
Example
getNumberDisplayString Get a list of names of collaborators
Example
getGeolocationDisplayString Get a list of names of collaborators
Example
getDurationDisplayString Get a list of names of collaborators
Example
getDateDisplayString Get a list of names of collaborators
Example
Tables addTable Get a list of names of collaborators
Example
deleteTable Get a list of names of collaborators
Example
renameTable Get a list of names of collaborators
Example
getTables Get a list of names of collaborators
Example
getActiveTable Get a list of names of collaborators
Example
getTableByName Get a list of names of collaborators
Example
getTableById Get a list of names of collaborators
Example
importDataIntoNewTable Get a list of names of collaborators
Example
Views addView Get a list of names of collaborators
Example
deleteView Get a list of names of collaborators
Example
renameView Get a list of names of collaborators
Example
getViews Get a list of names of collaborators
Example
getNonArchiveViews Get a list of names of collaborators
Example
getActiveView Get a list of names of collaborators
Example
getViewByName Get a list of names of collaborators
Example
getViewById Get a list of names of collaborators
Example
isDefaultView Get a list of names of collaborators
Example
isGroupView Get a list of names of collaborators
Example
isFilterView Get a list of names of collaborators
Example
Columns getColumns Get a list of names of collaborators
Example
getShownColumns Get a list of names of collaborators
Example
getColumnsByType Get a list of names of collaborators
Example
getColumnByName Get a list of names of collaborators
Example
getColumnByKey Get a list of names of collaborators
Example
modifyColumnData Get a list of names of collaborators
Example
Rows sqlQuery Use sql statement to query a dtable
Arguments
sql: SQL statement to be executed Note: By default, up to 100 results are returned. If you need more results, please add the limit parameter in the sql statement
Possible errors include
ValueError: sql can not be empty ConnectionError: network error Exception: no such table Exception: no such column Exception: columns in group by should match columns in select Example
dtable . sqlQuery ( 'select name, price, year from Bill' )
[
{ '_id' : 'PzBiZklNTGiGJS -4 c 0 _VLw' , ' na me' : 'Bob' , 'price' : 300 , 'year' : 2019 },
{ '_id' : 'Ep 7 odyv 1 QC 2 vDQR 2 raMvSA' , ' na me' : 'Bob' , 'price' : 300 , 'year' : 2021 },
{ '_id' : ' f 1 x 3 X_ 8 uT t SDUe 9 D 60 VlYQ' , ' na me' : 'Tom' , 'price' : 100 , 'year' : 2019 },
{ '_id' : 'NxeaB 5 pDRFKOI t Us_Ugxug' , ' na me' : 'Tom' , 'price' : 100 , 'year' : 2020 },
{ '_id' : 'W 0 BrjGQpSES 9 nf Sy t vXgMA' , ' na me' : 'Tom' , 'price' : 200 , 'year' : 2021 },
{ '_id' : 'EvwCW t X 3 RmKYKHQO 9 w 2 kLg' , ' na me' : 'Ja ne ' , 'price' : 200 , 'year' : 2020 },
{ '_id' : 'BTiIGSTgR 06 UhPLhejFc t A' , ' na me' : 'Ja ne ' , 'price' : 200 , 'year' : 2021 }
]
WHERE
dtable . sqlQuery ( 'select name, price from Bill where year = 2021 ' )
[
{ '_id' : 'Ep 7 odyv 1 QC 2 vDQR 2 raMvSA' , ' na me' : 'Bob' , 'price' : 300 },
{ '_id' : 'W 0 BrjGQpSES 9 nf Sy t vXgMA' , ' na me' : 'Tom' , 'price' : 200 },
{ '_id' : 'BTiIGSTgR 06 UhPLhejFc t A' , ' na me' : 'Ja ne ' , 'price' : 200 }
]
ORDER BY
dtable . sqlQuery ( 'select name, price, year from Bill order by year' )
[
{ '_id' : 'PzBiZklNTGiGJS -4 c 0 _VLw' , ' na me' : 'Bob' , 'price' : 300 , 'year' : 2019 },
{ '_id' : ' f 1 x 3 X_ 8 uT t SDUe 9 D 60 VlYQ' , ' na me' : 'Tom' , 'price' : 100 , 'year' : 2019 },
{ '_id' : 'NxeaB 5 pDRFKOI t Us_Ugxug' , ' na me' : 'Tom' , 'price' : 100 , 'year' : 2020 },
{ '_id' : 'EvwCW t X 3 RmKYKHQO 9 w 2 kLg' , ' na me' : 'Ja ne ' , 'price' : 200 , 'year' : 2020 },
{ '_id' : 'Ep 7 odyv 1 QC 2 vDQR 2 raMvSA' , ' na me' : 'Bob' , 'price' : 300 , 'year' : 2021 },
{ '_id' : 'W 0 BrjGQpSES 9 nf Sy t vXgMA' , ' na me' : 'Tom' , 'price' : 200 , 'year' : 2021 },
{ '_id' : 'BTiIGSTgR 06 UhPLhejFc t A' , ' na me' : 'Ja ne ' , 'price' : 200 , 'year' : 2021 }
]
GROUP BY
dtable . sqlQuery ( 'select name, sum(price) from Bill group by name' )
[
{ 'SUM(price)' : 600 , ' na me' : 'Bob' },
{ 'SUM(price)' : 400 , ' na me' : 'Tom' },
{ 'SUM(price)' : 400 , ' na me' : 'Ja ne ' }
]
DISTINCT
dtable . sqlQuery ( 'select distinct name from Bill' )
[
{ '_id' : 'PzBiZklNTGiGJS -4 c 0 _VLw' , ' na me' : 'Bob' },
{ '_id' : ' f 1 x 3 X_ 8 uT t SDUe 9 D 60 VlYQ' , ' na me' : 'Tom' },
{ '_id' : 'EvwCW t X 3 RmKYKHQO 9 w 2 kLg' , ' na me' : 'Ja ne ' }
]
appendRow Get a list of names of collaborators
Example
deleteRowById Get a list of names of collaborators
Example
deleteRowsByIds Get a list of names of collaborators
Example
modifyRow Get a list of names of collaborators
Example
forEachRow Get a list of names of collaborators
Example
getTableLinkRows Get a list of names of collaborators
Example
getViewRows Get a list of names of collaborators
Example
getGroupRows Get a list of names of collaborators
Example
getInsertedRowInitData Get a list of names of collaborators
Example
getRowsByID Get a list of names of collaborators
Example
getRowById Get a list of names of collaborators
Example
moveGroupRows Get a list of names of collaborators
Example
Plugins getPluginSettings Get a list of names of collaborators
Example
updatePluginSettings Get a list of names of collaborators
Example
deletePluginSettings Get a list of names of collaborators
Example
Constants ColumnTypes Get a list of names of collaborators
Example
Column icon configs Get a list of names of collaborators
Example
Column options Get a list of names of collaborators
Example
Formula result type Get a list of names of collaborators
Example
Select option colors Get a list of names of collaborators
Example
Table permission type Get a list of names of collaborators
Example
March 21, 2026 August 30, 2023 GitHub