Views¶
Global structure¶
Here is the global structure of a view object:
{
"_id": "0000",
"name": "Default View",
"type": "table",
"is_locked": false,
"rows": [],
"formula_rows": {},
"summaries": [],
"filter_conjunction": "And",
"sorts": [],
"filters": [],
"hidden_columns": [],
"groupbys": [],
"group_rows": [],
"groups": []
}
Please refer to the SeaTable API Reference for a more detailed presentation.
Get View(s)¶
getActiveView
Get the current view of the active table. Only available in SeaTable scripts.
Output Single view object
Example
getViewByName
Get a view of a table, specified by its name.
Output Single view object (undefined if no view with that name exists)
Example
listViews
Get all the views of a table.
Output Array of view objects
Example
Add View¶
addView
Add a new view to a table.
Example
Rename View¶
renameView
Rename an existing view.
Example