Skip to main content

system.kanoa.dashboard.updateFolder(folderInfo, userId)

Updates a folder


Parameters

folderInfo Dictionary

- folderDescriptionString
- folderIdIntegerThe id of the folder being updated
- folderNameStringThe name of the folder. This must be unique within the folder.
- iconStringThe path to the icon for this folder.
- iconColorStringThe color of the icon for this folder.
- parentIdIntegerThe 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.
- sortOrderIntegerDetermines 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')
>