system.kanoa.dashboard.updateFolder(folderInfo, userId)
Updates a folder
Parameters
folderInfo Dictionary
| - folderDescription | String | |
| - folderId | Integer | The id of the folder being updated |
| - folderName | String | The name of the folder. This must be unique within the folder. |
| - icon | String | The path to the icon for this folder. |
| - iconColor | String | The color of the icon for this folder. |
| - parentId | Integer | The id of the parent this folder is going into. Use None if the folder is going onto the root. |
| - roles | [string] | An array of roles that are able to view this folder. |
| - sortOrder | Integer | Determines where within the folder the folder in placed relative to other folders. If the same as another folder, then sorted by name. |
userId Integer
Returns
# of records modified Integer
message String None if successful
Example
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')
>