Skip to main content

system.kanoa.dashboard.updateDashboardWidget(dashboardWidgetInfo, userId)

Updates a dashboards widget


Parameters

dashboardWidgetInfo Dictionary

- breakpointIdInteger
- columnEndIntegerThe right most column for this widget
- columnStartIntegerThe left most column for this widget
- dashboardIdInteger
- enabledbit
- rowEndIntegerThe bottom row for this widget
- rowStartIntegerThe top row for this widget
- viewParamsString
- widgetIdInteger

userId Integer


Returns

# of records modified Integer
message string or None if no error


Example

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')