Troubleshooting Hierarchical Transformations in Kentico

By Dan Walker On December 11, 2014

Troubleshooting Hierarchical Transformations in Kentico

Hierarchical transformations are a powerful function of Kentico. They allow the aggregation of categorized or related data to be displayed in a flexible and efficient way without the complication of nesting repeaters.

However, getting hierarchical transformations set up in the first place can prove a little tricky. I’ve had many opportunities at BizStream to set up a universal viewer with a hierarchical transformation, and I’ve discovered these few areas where most of my time is spent troubleshooting.

1. Make sure to check the Load hierarchical data setting inside the universal viewer. Without this setting, the universal viewer won’t use the hierarchical transformation you set up and no data will display. I have spent an embarrassing amount of hours trying to find the reason my data isn’t appearing only to discover this one checkbox solved all of my problems.

2. In your query, the parent column of the top-level must all be the same. It can be NULL or a specified number. If it’s not the same, your transformation will show all of your lower level data under the first item in the top level. This issue is particularly problematic because all of your data is appearing, just in the wrong place, leading to a lot of wasted time troubleshooting in all the wrong areas.

3. Start your NodeLevel at 0. I’ve had issues where the top level data wouldn’t show when I was using 1 as the highest level, removing the inner data with it.

4. You must include the ##ORDERBY## macro in your query. By default, Kentico will add NodeLevel to this field. Not including this field can cause your page to throw an exception, and Kentico will end up throwing a hard exception.

With the hierarchical transformation, Kentico has created a much more straightforward and efficient method of displaying structured data. Although they are better than the previous methods of nesting repeaters, the gathering and displaying of hierarchical data still has some tricky areas. Once I found out how to work with them properly, I found that hierarchical transformations have become an essential part of my Kentico toolbox.

Click here to read more Tutorials posts
Start a Project with Us
Photo of the author, Dan Walker

About the author

Transported from the Great White North after graduating from Lake Superior State University, Dan Walker traded in his parka for a keyboard to come work for BizStream. Dan enjoys learning new technologies, and finds projects most fun when he has to learn something new in order to get it done. When he can find some spare time, Dan likes to play video games, root for the Detroit Lions, or - you guessed it - do some more programming.

View other posts by Dan

Subscribe to Updates

Stay up to date on what BizStream is doing and keep in the loop on the latest with Kentico.