You can use the Delete branch action to delete an entire branch of a list hierarchy, or the immediate children of a parent item.
When you designate one list to be the parent of another, you create a list hierarchy. Your list hierarchy can have several levels and different branches. A branch is a section of a list hierarchy you create when you select a list item to be the parent of various items in a child list.
Delete Branch enables you to delete all the items in one branch of a hierarchy at once. Workspace administrators can also delete items from lists in the tree view and grid view of each individual list.
A workspace administrator can set up a delete branch action to delete one or more items in a numbered list, along with either:
- all descendent items, down to the lowest level, and their related data
- the immediate children of the selected item or items, and their related data
You can configure a Delete Branch action to delete items from a flat list. However, if you do so, the action only deletes the item or items the user selects in that list.
Note: You cannot use Delete branch to delete a Top Level item. You can also only use Delete branch to delete items for which you have selective write access. If you try to run an action, and you lack write access to the selected items, the action does not delete them.
To enable users to run the action, you must publish it to a dashboard, along with a list that displays items from the numbered list for which the action is configured. This could be the numbered list itself, or a child list of the numbered list. Users can then select the list item or items from the numbered list to determine which branches to delete.
If you set up the Delete branch action to only delete the selected item and its immediate children, all other descendants of the item are removed from the list hierarchy, but not deleted. The removed items display at the bottom of the list in tree view, under any parents.
Example
A finance manager uses a Cost Center list to categorize expenses. Each cost center is an item in a numbered list. A Projects list contains various projects, each of which is assigned to a parent in the Cost Center list. An Expenses list contains various expense types, each of which is assigned to a parent in the Projects list.
A change to the organization's structure means that the finance manager needs to delete one of the cost centers, and all projects under it. The expenses still exist and need to be recategorized under different projects.
You can create a Delete branch action with Cost Center in the Delete from field and Immediate children only as the Level to delete. Publish this to a dashboard, along with the Cost Center list. The finance manager can now select any item in the Cost Center list and then the Delete branch button. The action deletes the selected cost center and all projects, but merely removes the expenses from the list hierarchy.
This means that the finance manager does not have to find and delete all the items that fall under that cost center individually. They can now reassign the expenses to other relevant projects.