When you browse a hierarchy in a business view, you can click the caret icon >, which expands the hierarchy node. The default behavior is to show a caret icon even if there are no child records to browse under a node.
For example, a caret icon is displayed for every customer in this hierarchy view.
![](https://app-us-east-1.t-cdn.net/5ef1e3639f2bb04fc7204631/posts/60a3d5a2d7bf997940ebe2c9/60a3d5a2d7bf997940ebe2c9_82337.png)
This behavior is undesirable. When I expand ABC Supply Co, Addison Lee, and AG2R La Mondiale, there are no children beneath these nodes.
![](https://app-us-east-1.t-cdn.net/5ef1e3639f2bb04fc7204631/posts/609db1f3e289f63e7def9094/609db1f3e289f63e7def9094_14734.png)
It would be best to only show the caret icon if there are child records to browse.
You can control this behavior using a SemQL filter on the Transition in the Entity Objects under the Business View.
How to add the filter on the transition
- Open the Business View in the Application Builder.
- In the Transitions, find the transition that controls the hierarchy nodes you want to see. In my example, that is Subsidiaries.
- Go to Hierarchy Configurations in the Properties.
- Enable SemQL for the Enable in Hierarchy option, instead of using the checkbox.
- Add the following SemQL expression. You will need to modify it to use your child reference.
ANY Subsidiaries HAVE ( ID IS NOT NULL )
![](https://app-us-east-1.t-cdn.net/5ef1e3639f2bb04fc7204631/posts/609db2a20c0d0e4619ba8892/609db2a20c0d0e4619ba8892_83738.png)
![](https://app-us-east-1.t-cdn.net/5ef1e3639f2bb04fc7204631/posts/609db2fb0c1905a0bc06f6dd/609db2fb0c1905a0bc06f6dd_58325.png)
After you refresh the application, you should see the new improvement. Only companies with child records will show the caret icon.
![](https://app-us-east-1.t-cdn.net/5ef1e3639f2bb04fc7204631/posts/609db369255eb40b6df4d746/609db369255eb40b6df4d746_39376.png)