Create Table
Create a new Table in a specific Solution.
create_table(
name: string,
solutionId: ID,
structure?: TableStructureField[],
) => Promise<ApplicationModel>;
Parameter Name | Type | Description |
---|---|---|
name | string | The name for the new Table. Must be unique in the Solution. |
solutionId | string | Id of the Solution to create the table in. |
structure? | TableStructureField | Status of the Solution. Defaults to active which is the active state. |
TableStructureField
export interface TableStructureField {
slug: string;
label: string;
field_type: Fields;
params: TParams;
nested?: AppStructureField[];
id?: ID;
}
Field Types & Params
See a list of valid field types and params here.
Example Script - Create Table
<!--create_table(
name: string,
solutionId: ID,
structure?: TableStructureField[],
) => Promise<ApplicationModel>;-->
<script>
window.SmartSuite.create_table('New Table', '67647d9b7a03fad7da12d9f0').then((res) => {
console.log('result =>>>', res);
});
</script>
Response
200 response
{
"id": "6776dd9e5e15c4ae92872c7a",
"name": "New Table",
"icon": "no-icon",
"solution": "67647d9b7a03fad7da12d9f0",
"slug": "sf6uf5ie",
"status": "active",
"structure": [
{
"slug": "title",
"label": "Title",
"field_type": "recordtitlefield",
"params": {
"is_auto_generated": false,
"template": "",
"primary": true,
"max_length": null,
"required": true,
"unique": true,
"placeholder": "Enter record title",
"width": 1,
"is_migrating": false,
"valid": true,
"indexed": false,
"help_doc": null,
"help_text_display_format": "tooltip"
}
},
{
"slug": "description",
"label": "Description",
"field_type": "richtextareafield",
"params": {
"required": false,
"unique": false,
"hidden": false,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "",
"default_value": {
"data": {},
"html": "",
"preview": ""
},
"width": 2,
"system": false,
"valid": true,
"is_migrating": false
}
},
{
"slug": "assigned_to",
"label": "Assigned To",
"field_type": "userfield",
"params": {
"include_filter": false,
"field_filter": {},
"display_format": "image_only",
"notifications_enabled": true,
"linked_application": "members",
"entries_allowed": "single",
"linked_field_slug": "status",
"required": false,
"unique": false,
"hidden": false,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "Enter assign to",
"default_value": [],
"width": 1,
"system": false,
"valid": true,
"is_migrating": false
}
},
{
"slug": "status",
"label": "Status",
"field_type": "statusfield",
"params": {
"choices": [
{
"label": "Backlog",
"value": "backlog",
"value_order": 1,
"value_color": "#6A849B",
"is_complete": false
},
{
"label": "In Process",
"value": "in_progress",
"value_order": 2,
"value_color": "#FFB938"
},
{
"label": "Ready for Review",
"value": "ready_for_review",
"value_order": 3,
"value_color": "#FF9210",
"is_complete": false
},
{
"label": "Complete",
"value": "complete",
"value_order": 4,
"value_color": "#3EAC40",
"is_complete": true
}
],
"required": false,
"unique": false,
"hidden": false,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "",
"default_value": {
"value": "backlog",
"updated_on": null
},
"width": 1,
"system": false,
"valid": true,
"is_migrating": false
}
},
{
"slug": "due_date",
"label": "Due Date",
"field_type": "duedatefield",
"params": {
"display_format": "standard",
"linked_field": "status",
"required": false,
"unique": false,
"hidden": false,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "",
"default_value": null,
"width": 1,
"system": false,
"valid": true,
"is_migrating": false,
"nested": [
{
"slug": "from_date",
"label": "Start Date",
"field_type": "datefield",
"params": {
"required": false,
"unique": false,
"hidden": false,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "Select Date Range",
"default_value": null,
"width": 1,
"system": false,
"valid": true,
"is_migrating": false,
"display_format": "standard"
}
},
{
"slug": "to_date",
"label": "End Date",
"field_type": "datefield",
"params": {
"required": false,
"unique": false,
"hidden": false,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "Select Date Range",
"default_value": null,
"width": 1,
"system": false,
"valid": true,
"is_migrating": false,
"display_format": "standard"
}
}
]
},
"nested": [
{
"slug": "from_date",
"label": "Start Date",
"field_type": "datefield",
"params": {
"required": false,
"unique": false,
"hidden": false,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "Select Date Range",
"default_value": null,
"width": 1,
"system": false,
"valid": true,
"is_migrating": false,
"display_format": "standard"
}
},
{
"slug": "to_date",
"label": "End Date",
"field_type": "datefield",
"params": {
"required": false,
"unique": false,
"hidden": false,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "Select Date Range",
"default_value": null,
"width": 1,
"system": false,
"valid": true,
"is_migrating": false,
"display_format": "standard"
}
}
]
},
{
"slug": "priority",
"label": "Priority",
"field_type": "singleselectfield",
"params": {
"display_format": "importance",
"control_type": "dropdown",
"edit_values": false,
"edit_help_texts": false,
"new_choices_allowed": true,
"choices": [
{
"label": "Urgent",
"value": "urgent",
"value_color": "#FF5757",
"value_order": 0,
"icon_type": "icon",
"weight": 1
},
{
"label": "High",
"value": "high",
"value_color": "#FFB938",
"value_order": 1,
"icon_type": "icon",
"weight": 1
},
{
"label": "Normal",
"value": "normal",
"value_color": "#3EAC40",
"value_order": 2,
"icon_type": "icon",
"weight": 1
},
{
"label": "Low",
"value": "low",
"value_color": "#6A849B",
"value_order": 3,
"icon_type": "icon",
"weight": 1
}
],
"required": false,
"unique": false,
"hidden": false,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "Select Value",
"default_value": "",
"width": 1,
"system": false,
"valid": true,
"is_migrating": false
}
},
{
"slug": "first_created",
"label": "First Created",
"field_type": "firstcreatedfield",
"params": {
"display_format": "avatar_date",
"date_format": "standard",
"include_time": false,
"required": false,
"unique": false,
"hidden": false,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "",
"default_value": null,
"width": null,
"system": true,
"valid": true,
"is_migrating": false
}
},
{
"slug": "last_updated",
"label": "Last Updated",
"field_type": "lastupdatedfield",
"params": {
"display_format": "avatar_date",
"date_format": "standard",
"include_time": false,
"required": false,
"unique": false,
"hidden": false,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "",
"default_value": null,
"width": null,
"system": true,
"valid": true,
"is_migrating": false
}
},
{
"slug": "followed_by",
"label": "Followed by",
"field_type": "userfield",
"params": {
"include_filter": false,
"field_filter": {},
"display_format": "image_name",
"notifications_enabled": true,
"linked_application": "members",
"entries_allowed": "single",
"linked_field_slug": null,
"required": false,
"unique": false,
"hidden": true,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "Enter assign to",
"default_value": [],
"width": 1,
"system": true,
"valid": true,
"is_migrating": false
}
},
{
"slug": "comments_count",
"label": "Open Comments",
"field_type": "commentscountfield",
"params": {
"required": false,
"unique": false,
"hidden": false,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "Enter number",
"default_value": null,
"width": null,
"system": true,
"valid": true,
"is_migrating": false
}
},
{
"slug": "autonumber",
"label": "Auto Number",
"field_type": "autonumberfield",
"params": {
"include_labels": true,
"suffix": "",
"prefix": "#",
"starting_number": 1,
"leading_zeros": 2,
"primary": false,
"required": false,
"unique": true,
"hidden": false,
"help_text_display_format": "tooltip",
"help_doc": null,
"placeholder": "",
"default_value": null,
"width": 0,
"system": true,
"valid": true,
"is_migrating": false
}
}
],
"primary_field": "title",
"order": 219225,
"structure_layout": {
"mode": "fifty_fifty",
"fifty_fifty": {
"rows": [
[
"title",
""
],
[
"description",
""
],
[
"assigned_to",
"status"
],
[
"due_date",
"priority"
]
],
"sections": []
},
"seventy_thirty": {
"seventy": [
"description"
],
"thirty": [
"title",
"assigned_to",
"status",
"due_date",
"priority"
],
"seventy_sections": [],
"thirty_sections": []
},
"hidden_fields": null,
"single_column": {
"rows": [
"title",
"description",
"assigned_to",
"status",
"due_date",
"priority"
],
"sections": []
}
},
"show_all_reports_members": [],
"fields_metadata": {},
"permissions": {
"level": "all_members",
"members": [],
"teams": [],
"permissions_metadata": {}
},
"field_permissions": [],
"first_created": {
"by": "676ef5543d1b070aaff642ae",
"on": "2025-01-02T18:40:30.909396Z"
},
"settings": {
"emails": false,
"meeting_notes": false,
"call_log": false
},
"record_term": "record",
"fields_count": {
"total": 10
},
"record_avatar_field_slug": null,
"hidden": false
}