Skip to main content

system.kanoa.dashboard.addUserDashboard(userDashboardInfo, userId)

Adds a new user dashboard


Parameters

userDashboardInfo Dictionary

- dashboardIdInteger
- isFavoriteBoolean
- isPrimaryBooleanWhen true, this dashboard is shown on main overview page when the user logs in
- userIdInteger

userId Integer


Returns

userDashboardId Integer
message string None if successful


Example

dashboardInfo = {
"dashboardId": 4,
"userId": 7,
"isPrimary": True,
"isFavorite": False
}
userId = 123
dashboardId, msg = system.kanoa.dashboard.addUserDashboard(dashboardInfo, userId)
if msg: system.perspective.sendMessage('showFailerToast', msg)
else: system.perspective.sendMessage('showSuccessfulToast', 'User Dashboard has been saved')