How do I convert from Tree by Level to Tree by ID?

When loading a hierarchy into OrgVue we have the option of a ‘Tree by ID’ or a ‘Tree by Level’. OrgVue is optimised for the former so it makes sense to ensure our data is in this format, this article details the process for converting from a ‘Tree by Level’ to a ‘Tree by ID’.

A ‘Tree by Level’ looks like the image below. You can see that each row is one activity (the name of which is in column D), these are grouped together into processes (shown in column C) and all of these form part of the HR Process Value Stream (column B). We can then store additional information about these activities, such as the type in column A.



The first step of the process is to rename the columns so that OrgVue can recognise the data as a ‘Tree by Levels’. Give the relevant columns a common prefix, in this case ‘Level_’ and then put the level number after this. This top of the hierarchy is Level_1 (in this case the value stream).


We can now paste the data into a new blank dataset in OrgVue. Select ‘Tree by Level’ at the paste options window and select the appropriate prefix from the drop down list.

When pasted into OrgVue the data will look like this. OrgVue has built a hierarchy out of these levels and has created extra rows of data to enable this (you will notice that rows with a star next to them were not present in the source data but have been created to visualise the hierarchy).


Whenever data is loaded into OrgVue each row is given a unique id. We do not always see this but we can access it using Gizmo (if you are not familiar with Gizmo it is OrgVue’s expression language: a guide can be found here). We will use these as the IDs of our data so that we can convert to a ‘Tree by ID’.

Add two new properties called ‘Activity ID’ and ‘Parent ID’.


We can now populate these properties by splashing a gizmo expression in each. Use the property pane on the left hand side of the screen.

For Activity ID use:!!*

For Parent ID use:!!*

The ‘!!*’ means that the same expression is run for all nodes and the resulting value is then hard coded. This is called a splash command.

You can see the results as new columns in the data.


You will notice that only the ‘Level’ property on the left hand side has a descriptive label for all rows in the data, this is currently worked out by OrgVue so we want to hardcode the values. This is the same process we used for IDs. Add a new column and then splash a gizmo expression for the Label propertry.




The final steps are to copy and paste this data into a new OrgVue dataset and set it up as a ‘Tree by ID’.

Click ‘Copy’ in the top right hand corner of the OrgVue screen and then click ‘Prepare’ and CTRL-C when prompted.


We can then paste this data into Excel and see our three new columns. We can delete the blank column on the left (_level_).


Now we can paste this back into OrgVue as a new ‘Tree by ID’ dataset using ‘Activity ID’ and ‘Parent ID’.


This article was authored by Miranda Copps from the OrgVue consulting team



Have more questions? Submit a request