Skip to main content

system.kanoa.dashboard.addWidgetCategory(categoryInfo, userId)

Create a new widget category


Parameters

categoryInfo Dictionary

- enabledbit
- widgetCategoryDescriptionStringThe description of the widget category
- widgetCategoryNameStringThe 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')