How Can I Speed Up the Hierarchy?
There are a few things you can do to make the hierarchy feel faster:
There is one code change you can make to increase the speed of the hierarchy about 12%. In the "Build..." scripts like "Build Hierarchy Level 1" we use global variables containing the names of your primary key fields instead of using the primary key fields themselves. This is a bit slower than using the actual field names, but it means you don't have to edit these scripts when hooking up the hierarchy.
You can speed the hierarchy up a bit by removing the reference to these global variables and using your own fields instead. Here's how:
Edit the script "Build Hierarchy Level 1" and find the comment "Record the ID of the Level 1 Record". Right below that we set a variable $$Hy_ID to a calc using "Evaluate...". In that step, replace this...
...with the name of your primary key at level 1. In our sample data this would be:
Continue down this script to the next set variable line. There replace this...
...with this, using the primary key of your level 2 record:
Do the same for the similar lines in each of the other level "Build..." scripts.