Using Fewer Levels

What if I Want to Use Fewer than 5 Levels?

The hierarchy supports up to 5 levels, but you can easily use fewer levels if you'd like. You don't actually have to change much to use fewer levels.

In this example we'll pretend you only have two levels in the hierarchy.

To go down to two levels you just don't connect the table occurrences HierarchyDataLevel3 to HierarchyDataLevel2.

Leave everything else in place at the hierarchy will just stop at level 2. But if you want to tidy things up, there are some items you could delete. However, you may consider leaving these in place in case you want to use more levels down the road.

1. First, you don't need to create (or can delete) the table occurrences HierarchyDataLevel3, 4, and 5 and HierarchyPortaLevel3, 4, and 5.

2. Then delete the sort scripts for the levels you don't need ("Sort Level 3 Records", etc.)

3. Next delete the "build" scripts for the levels you don't need ("Build Hierarchy Level 3, etc.)

4. Now edit the last build script you have: in our example this would be "Build Hierarchy Level 2 { Open All }". Find the comment beginning "Is there a child of this Record?..." and delete that comment and the following line beginning "Set Variable..."

5. A few steps later you'll find a step where we set the variable "$$Hy_RecordNumbersWithChildrenLevel2". Delete that step as well.

6. Continue editing this script, looking dow through the steps until you get to an If() statement beginning "// Are we opening all regardless...". Delete that and everything past it until you get to the End If statement. Delete that End If also.

That's it.

[email protected]
Follow us: