system.kanoa.dashboard.updateFolder
Description
Updates a dashboard folder.Syntax
updateFolder(folderInfo, userId)Parameters:
Returns:
Dictionary
Parameter | Type | Required | Notes |
---|---|---|---|
folderName | string | The name of the folder. This must be unique within the parent folder | |
folderDescription | string | Some information about the folder | |
parentId | int | The id of the parent this folder is going into. Use None if the folder is going onto the root. | |
icon | string | path to the icon | |
iconColor | int | The color of the icon for this folder i.e '#FF0000' or '--KcRed-60' | |
roles | [string] | list of roles that a user must have to view this folder | |
sortOrder | int | Determines the folders order within the folder. If None, then sorted by name. | |
rowGap | int | The gap between the rows | |
columnGap | int | The gap between the columns |
Code Examples
# Example usage
folderInfo = {
"folderId": 12,
"folderName": "Jason's Dashboards",
"folderDescription": "All my personal dashboards in one place",
"icon": None,
"iconColor": None,
"parentId": None,
"roles": None,
"sortOrder": None
}
userId = 123
retVal, msg = system.kanoa.dashboard.updateFolder(folderInfo, userId)
if msg: system.perspective.sendMessage('showFailerToast', msg)
else: system.perspective.sendMessage('showSuccessfulToast', 'Folder has been updated')
>