Create View
Creates a View.
Create Voew
Creates a View in a specified Table and Solution.
create_view(
tableId: ID,
solutionId: ID,
label: string,
viewMode: ViewMode,
rest?: Partial<Report>
): Promise<Report>;
Parameter Name | Type | Description |
---|---|---|
tableId | string | The Id of the Table to create the View in. |
solutionId | string | The Id of the Solution that corresponds with the target Table. |
label | string | The display name of the View. |
viewMode | string | The view mode. Options: grid, card, kanban, map, timeline, chart, form, dashboard, calendar |
Create View
<!-- create_view(
applicationID: ID,
solutionID: ID,
label: string,
viewMode: ViewMode,
rest?: Partial<Report>
): Promise<Report>;-->
<script>
window.SmartSuite.create_view("675adf9bb73844be508989b8", "675adf9bb73844be508989b6", "new test view", "card" ).then((res) => {
console.log('result =>>>', res);
});
</script>
Response
200 Response
{
"application": "6703f250f8f758cd80dbade4",
"autosave": true,
"description": null,
"form_state": null,
"id": "6703f250f8f758cd80dbade5",
"is_description_inline": true,
"is_description_enabled": false,
"is_locked": false,
"is_password_protected": false,
"is_private": false,
"label": "Grid View",
"map_state": {
"settings": {
"mapTypeId": "roadmap",
"locationRadius": {
"enabled": false,
"meters": 0,
"measureUnit": "miles"
},
"locationMarker": {
"iconType": "pin",
"iconSizeType": "m",
"iconColor": "#3A86FF"
},
"displayElements": {
"roadmap": {
"labels": 1,
"terrain": 1,
"highways": 2,
"roads": 2,
"transit": 0,
"poi": 1,
"water": 2
},
"satellite": {
"labels": 1,
"terrain": 1,
"highways": 2,
"roads": 0,
"transit": 0,
"poi": 0,
"water": 2
},
"hybrid": {
"labels": 1,
"terrain": 1,
"highways": 2,
"roads": 2,
"transit": 0,
"poi": 0,
"water": 2
},
"silver": {
"labels": 2,
"terrain": 1,
"highways": 2,
"roads": 2,
"transit": 1,
"poi": 1,
"water": 2
},
"retro": {
"labels": 2,
"terrain": 1,
"highways": 2,
"roads": 2,
"transit": 1,
"poi": 1,
"water": 2
}
}
},
"sidebarActive": false
},
"order": 0,
"owner": "5fa01dedaa4e41222745cbab",
"parent_folder": null,
"private_member": null,
"sharing_allow_all_fields": false,
"sharing_allow_copy": false,
"sharing_allow_export": true,
"sharing_allow_open_record": false,
"sharing_enabled": false,
"sharing_password": null,
"sharing_show_toolbar": true,
"sharing_hash": "M3axcVGdAO",
"solution": "6703f24ff8f758cd80dbade2",
"state": {
"filterWindow": {
"opened": false,
"filter": {
"operator": "and",
"fields": []
},
"new_filters": {
"operator": "and",
"conditions": []
}
},
"fieldsWindow": {
"visibleFields": [
"title",
"due_date",
"status",
"s10952ef8a",
"dependency"
],
"fixedFieldsCount": 1,
"columnsWidth": {},
"collapsed": []
},
"aggregates": {},
"coverWindow": null,
"sortWindow": {
"sort": []
},
"groupbyWindow": {
"collapsed": {},
"group": []
},
"spotlightWindow": {
"spotlights": [],
"by_field_colors": null
},
"cardSizeWindow": {
"size": "s"
},
"rowSizeWindow": {
"size": "compact",
"previousSize": null
},
"stackByWindow": {
"columnFieldSlug": null,
"swimlaneFieldSlug": null,
"collapsedColumns": [],
"collapsedSwimlanes": [],
"columnsValues": []
},
"locationByWindow": {
"selectedFieldSlug": null
},
"calendarFieldsWindow": {
"fields": [],
"showRecordsList": false,
"viewType": "dayGridMonth",
"externalReportsInfo": [],
"displayWeekends": true
},
"timelineFieldsWindow": {
"fields": [],
"viewMode": "day",
"showRecordsList": false,
"periods": []
},
"chartSettings": {
"sidebarActive": true,
"selectedFields": [],
"selectedChart": "bar",
"checkedLegends": [],
"sortedLegends": [],
"customSortApplied": false,
"groupByField": {
"slug": null,
"nestedOption": null,
"additionalOption": null
},
"dynamicFilterField": {
"slug": null,
"nestedOption": null,
"fieldOptions": [],
"selectedOption": null
},
"dynamicFilterSectionExpanded": false,
"advancedChartOptions": {
"showDataLabels": false,
"showValueAxisLabel": false,
"showCategoryAxisLabel": false,
"showXAxisLabel": false,
"showYAxisLabel": false,
"showBubbleLegend": false
},
"advancedChartOptionsExpanded": false,
"categories": [],
"drillIn": {
"visibleFields": null
},
"benchmarkLines": [],
"benchmarkLinesSectionExpanded": false,
"totals": [],
"totalsSectionExpanded": false
},
"ganttFieldsWindow": {
"viewPreset": "weekAndDayLetter",
"showDependencyArrows": true,
"showTaskLabels": true,
"highlightCriticalPath": false,
"showProjectStartAndEndPoints": false,
"highlightNonWorkingDays": false,
"showColumnLines": true,
"showTodayLine": true
},
"isToolbarVisible": true
},
"view_mode": "grid",
"dashboard": {
"tabs": {
"enabled": false,
"position": "left",
"tabs": [],
"logo": null,
"logo_size": null,
"action_buttons": {
"size": "medium",
"alignment": "left",
"items": [],
"columns": []
},
"icon": null,
"text_color": "light"
},
"footer": {
"enabled": false,
"layout": "simple",
"logo": null,
"logo_size": null,
"links": {
"size": "medium",
"alignment": "left",
"items": [],
"columns": []
},
"social_networks": [],
"tagline": {
"primary": "",
"secondary": ""
},
"text_color": "dark",
"background": {
"color": "#FFFFFF",
"image": {
"file": null,
"fit": "cover"
},
"background_type": "color"
}
},
"style": {
"width": "auto",
"background_color": "#FFFFFF"
}
}
}
List Views
Get all Views in a Table by Table Id.
<!--list_views(tableId: ID, fieldSlugs?: readonly string[]): Promise<Report[]>;-->
Parameter Name | Type | Description |
---|---|---|
tableId | string | The Id of the Table. |
fieldSlugs | array of strings | (optional) Array of field slugs to return. |
List Views
<!--list_views(tableId: ID, fieldSlugs?: readonly string[]): Promise<Report[]>;-->
<script>
window.SmartSuite.list_views('6716999c6b87f8d761d72bdf').then((res) => {
console.log('result =>>>', res);
});
</script>
Response
200 Response
[
{
"label": "Grid View",
"description": null,
"is_description_inline": true,
"is_description_enabled": false,
"solution": "670591d10d49cf96bf74c49a",
"application": "6716999c6b87f8d761d72bdf",
"state": {
"filterWindow": {
"opened": false,
"filter": {
"operator": "and",
"fields": []
},
"new_filters": {
"operator": "and",
"conditions": []
}
},
"fieldsWindow": {
"visibleFields": [
"title",
"description",
"status"
],
"fixedFieldsCount": 1,
"columnsWidth": {},
"collapsed": []
},
"aggregates": {},
"coverWindow": null,
"sortWindow": {
"sort": []
},
"groupbyWindow": {
"collapsed": {},
"group": []
},
"spotlightWindow": {
"spotlights": [],
"by_field_colors": null
},
"cardSizeWindow": {
"size": "s"
},
"rowSizeWindow": {
"size": "compact",
"previousSize": null
},
"stackByWindow": {
"columnFieldSlug": null,
"swimlaneFieldSlug": null,
"collapsedColumns": [],
"collapsedSwimlanes": [],
"columnsValues": []
},
"locationByWindow": {
"selectedFieldSlug": null
},
"calendarFieldsWindow": {
"fields": [],
"showRecordsList": false,
"viewType": "dayGridMonth",
"externalReportsInfo": [],
"displayWeekends": true
},
"timelineFieldsWindow": {
"fields": [],
"viewMode": "day",
"showRecordsList": false,
"periods": []
},
"chartSettings": {
"sidebarActive": true,
"selectedFields": [],
"selectedChart": "bar",
"checkedLegends": [],
"sortedLegends": [],
"customSortApplied": false,
"groupByField": {
"slug": null,
"nestedOption": null,
"additionalOption": null
},
"dynamicFilterField": {
"slug": null,
"nestedOption": null,
"fieldOptions": [],
"selectedOption": null
},
"dynamicFilterSectionExpanded": false,
"advancedChartOptions": {
"showDataLabels": false,
"showValueAxisLabel": false,
"showCategoryAxisLabel": false,
"showXAxisLabel": false,
"showYAxisLabel": false,
"showBubbleLegend": false
},
"advancedChartOptionsExpanded": false,
"categories": [],
"drillIn": {
"visibleFields": null
},
"benchmarkLines": [],
"benchmarkLinesSectionExpanded": false,
"totals": [],
"totalsSectionExpanded": false
},
"ganttFieldsWindow": {
"viewPreset": "weekAndDayLetter",
"showDependencyArrows": true,
"showTaskLabels": true,
"highlightCriticalPath": false,
"showProjectStartAndEndPoints": false,
"highlightNonWorkingDays": false,
"showColumnLines": true,
"showTodayLine": true
},
"isToolbarVisible": true
},
"map_state": {
"settings": {
"mapTypeId": "roadmap",
"locationRadius": {
"enabled": false,
"meters": 0,
"measureUnit": "miles"
},
"locationMarker": {
"iconType": "pin",
"iconSizeType": "m",
"iconColor": "#3A86FF"
},
"displayElements": {
"roadmap": {
"labels": 1,
"terrain": 1,
"highways": 2,
"roads": 2,
"transit": 0,
"poi": 1,
"water": 2
},
"satellite": {
"labels": 1,
"terrain": 1,
"highways": 2,
"roads": 0,
"transit": 0,
"poi": 0,
"water": 2
},
"hybrid": {
"labels": 1,
"terrain": 1,
"highways": 2,
"roads": 2,
"transit": 0,
"poi": 0,
"water": 2
},
"silver": {
"labels": 2,
"terrain": 1,
"highways": 2,
"roads": 2,
"transit": 1,
"poi": 1,
"water": 2
},
"retro": {
"labels": 2,
"terrain": 1,
"highways": 2,
"roads": 2,
"transit": 1,
"poi": 1,
"water": 2
}
}
},
"sidebarActive": false
},
"form_state": null,
"autosave": true,
"is_locked": false,
"view_mode": "grid",
"order": 0,
"owner": "5fa01dedaa4e41222745cbab",
"is_private": false,
"parent_folder": null,
"sharing_hash": "mmKAarVQNB",
"sharing_password": null,
"sharing_allow_copy": false,
"sharing_allow_all_fields": false,
"sharing_allow_export": true,
"sharing_allow_open_record": false,
"sharing_enabled": false,
"sharing_show_toolbar": true,
"dashboard": {
"tabs": {
"enabled": false,
"position": "left",
"tabs": [],
"logo": null,
"logo_size": null,
"action_buttons": {
"size": "medium",
"alignment": "left",
"items": [],
"columns": []
},
"icon": null,
"text_color": "light"
},
"footer": {
"enabled": false,
"layout": "simple",
"logo": null,
"logo_size": null,
"links": {
"size": "medium",
"alignment": "left",
"items": [],
"columns": []
},
"social_networks": [],
"tagline": {
"primary": "",
"secondary": ""
},
"text_color": "dark",
"background": {
"color": "#FFFFFF",
"image": {
"file": null,
"fit": "cover"
},
"background_type": "color"
}
},
"style": {
"width": "auto",
"background_color": "#FFFFFF"
}
},
"is_password_protected": false,
"id": "6716999c6b87f8d761d72be0"
}
]