How to maintain a hierarchy in NextTables
Finding, adding, copying, editing, moving and deleting nodes in a hierarchy view, with the moves NextTables refuses and the warnings that still save.
You will learn
- How to find a node in a large hierarchy and keep its path in view.
- How to add, copy and edit nodes.
- How to move nodes and whole subtrees by drag and drop, and reorder siblings.
- How to delete nodes, with or without their children.
- Which moves are refused, and which warnings still let you save.
This article is for controllers and data stewards who keep a hierarchy up to date. It works the same for parent-child hierarchies and hierarchies with a directory; the differences are named where they apply.
Prerequisites
- A hierarchy view. See Introduction to hierarchies in NextTables.
- View data to browse, Add data to add nodes, Edit data to move and edit them, Delete data to delete them, and Delete all to delete more than 30 rows at once.
Step-by-Step Instructions
1) Find a node
- In a hierarchy with a directory, pick the hierarchy in the Hierarchy switch of the toolbar first.
- Expand nodes in the Node column. Large hierarchies load in blocks as you expand and scroll.
- Type in Search nodes to search the whole hierarchy. Each match shows its path. Select a match to open its path in the tree.
- In the menu of the Node column, Keep parents in view pins the parents of the rows you scroll through to the top of the grid.

2) Add a node
- Select the node that will be the parent and select Add node. With no node selected, the new node starts at the top level.
- In the dialog, check the Parent. Search or browse to change it, or pick Root level.
- In a hierarchy with a directory, choose the Node type. A node type with a key asks for its identifying fields. A text node asks for a Node ID.
- Fill in your own fields and select Add node. The node is placed last under its parent.

The dialog checks while you type, for example "A node with this key already exists in this hierarchy."
3) Copy or edit a node
- Copy node opens the same dialog with the values of the selected node, including its validity. In a parent-child hierarchy, enter the node's key again; for a text node, enter its Node ID. A node with a key in a hierarchy with a directory keeps its key, so you can place the same node under another parent for another period. The copy is placed directly below the original.
- Edit node changes the selected node. Changing its Parent moves the node with its subtree.
- To change one value, double-click the cell instead and edit it inline. The status next to the toolbar shows Saving... and then Saved.
4) Move nodes by drag and drop
- Drag a node by its handle. The whole subtree moves with it.
- Drop it onto the middle of a row to place it under that node. Drop it on the upper or lower edge of a row to place it above or below that row.
- Hover over a collapsed node for a moment to expand it while you drag.
- Reordering among siblings needs a sort order, which is chosen when the hierarchy is created.

While you drag, the grid says why a drop is not possible:
- "A node cannot be moved into its own branch"
- "This node cannot have children": the target is a data node, which is always a leaf.
- "This hierarchy has no sort field, so nodes can't be reordered"
In a hierarchy with a directory, node types can share a key column, for example a controlling area used by both a cost center group type and a cost center type. A moved node then takes that value from its new ancestor, and a message shows the old and the new key, for example "1000 / CC4711 is now 2000 / CC4711". Check that the new combination exists in your master data.
5) Delete nodes
- Select one or more nodes and select Delete node.
- Under What happens to the children, choose Keep the children to move them up to the parent, or Delete the whole subtree. Keeping the children moves them, which needs Edit data.
- With validity, only the row valid on the reference date is deleted. Rows of the same node in other periods stay.
- Up to 30 rows are deleted at once. More rows run as a background delete that you can cancel until it starts, and need Delete all.

6) Delete all nodes
- Select all nodes and select Delete nodes. The dialog Delete all nodes? deletes "all selected nodes of the hierarchy at the selected reference date".
- Type delete to confirm. Nodes you deselected stay and move up to their nearest remaining parent.
- To delete a whole hierarchy from a directory, in every period, see How to work with time-dependent hierarchies.
Warnings that still let you save
Some edits are allowed but flagged, so you can finish a reorganization in several steps:
- "This edit leaves nodes without a parent on some dates. It can still be saved."
- "This node has no parent" for a period, after a change to validity.
- "The structure view's rules flag this edit. It can still be saved.", when a form rule of the hierarchy warns.
Nodes without a parent on the reference date are not shown in the tree. A notice says how many there are, for example "2 nodes have no parent on this date and are not shown in the tree."
Troubleshooting / FAQs
1. I can't drag nodes.
Moving needs Edit data. Without it, or when the view is set to read only, the grid shows no drag handle.
2. "The hierarchy data has changed. Refresh to load the latest structure."
Someone else changed the hierarchy while you worked. Select Refresh and repeat your change.
3. A deleted node is back on another date.
With validity, a delete only removes the row valid on the reference date. Change the reference date to see and delete the node's other periods.
4. A node I added doesn't appear in the tree.
Check its validity against the reference date, and check that its parent exists on that date. A node without a parent on the reference date is hidden and counted in the notice above the tree.
5. Why are Row level security and Filters greyed out in View settings?
Row-level security and filters can't be configured for hierarchy views yet. The entries show "Row level security and filters are temporarily disabled for hierarchies."


