system.kanoa.dashboard.addWidgetCategory(categoryInfo, userId)
Create a new widget category
Parameters
categoryInfo Dictionary
| - enabled | bit | |
| - widgetCategoryDescription | String | The description of the widget category |
| - widgetCategoryName | String | The name of the category |
userId Integer: Id of user executing the function
Returns
widgetCategoryId Integer
message String None if success
Example
userId = 123
categoryInfo = {
"widgetCategoryName": "Analysis",
"widgetCategoryDescription": "Contains analysis style widgets",
"enabled": True
}
widgetCategoryId, msg = system.kanoa.dashboard.addWidgetCategory(categoryInfo, userId)
if msg: system.perspective.sendMessage('showFailerToast', msg)
else: system.perspective.sendMessage('showSuccessfulToast', 'Widget Category has been saved')