system.kanoa.dashboard.updateDashboardWidget
Description
Updates a dashboards widgetSyntax
updateDashboardWidget(widgetInfo, userId)Parameters:
Returns:
Dictionary
Parameter | Type | Required | Notes |
---|---|---|---|
dashboardWidgetId | int | ||
dashboardId | int | ||
breakpointId | int | ||
widgetId | int | ||
rowStart | int | The top row for this widget | |
rowEnd | int | The bottom row for this widget | |
columnStart | int | The left most column for this widget | |
columnEnd | int | The right most column for this widget | |
enabled | boolean |
Code Examples
# Example usage
widgetInfo = {
"dashboardWidgetId": 12,
"dashboardId": 4,
"breakpointId": 1,
"widgetId": 7,
"enabled": True,
"rowStart": 8,
"rowEnd": 8,
"colStart": 2,
"colEnd": 20,
}
userId = 123
retVal, msg = system.kanoa.dashboard.updateDashboardWidget(widgetInfo, userId)
if msg: system.perspective.sendMessage('showFailerToast', msg)
else: system.perspective.sendMessage('showSuccessfulToast', 'Dashboard widget has been updated')