Components
Nested Layout
Hierarchically Expandable Entries
In this article, we will show you how to optimally adjust the widget arcComponentNestedLayout to implement hierarchically expandable elements in your project. Whether you need nested menus, categories, or other list structures – with our tips and tricks, you can extend the functionality of the widget and tailor it perfectly to your requirements.

Preparation
First, think about which tables you need for your hierarchical entries. These could be projects with associated tasks, for example. In our example, however, we will only work with tasks and their subtasks, which are both recorded in the table "Tasks". Each task is categorized either as a "parent task" or a "subtask". To optimally represent the hierarchy, the following fields are required in the table:
Yes/No Field:
showChildren
– Controls whether the subtasks should be displayed.Formula Field:
paddingLeft
This field provides the spacing on the left side (indented subtasks) of the entries and uses the following logic:
Formula Field:
Level
Determines the hierarchy level of the task. The formula for that is:
Formula Field:
cntUnteraufgaben
Counts the number of subtasks and uses this formula:
Formula Field:
nestedItem_row
This field prepares the structure for displaying the hierarchical entries.
These fields serve as helper fields and can be placed in their own Helper tab since they do not need to be directly visible on the main interface.
Designing Rows with nested_row
With the following code, you populate the formula field nested_row
, which allows you to control the presentation of individual rows in your custom layout. In this example, the rows are structured clearly and functionally: they contain an icon for expanding and collapsing, the designation of the task, and a field that shows the number of subtasks. Additionally, the rows are clickable, allowing you to directly access the respective data record. Here is the code:
In this configuration:
Icon for Expanding and Collapsing: The icon shows either a minus (for expanded) or a plus (for collapsed) depending on the
showChildren
status. Additionally, the icons are faded for tasks without subtasks.Designation of the Task: The designation of the task is indented accordingly, making the hierarchy clearly recognizable.
Number of Subtasks: A text field displays the number of existing subtasks or indicates when none are present.
This setup allows for a clear and functional structure for your hierarchical entries.
Inserting the Hierarchical Layout into the Target Interface
Now you can create a formula field in your Custom Layout on your target interface that reproduces the rows defined earlier with nested_row
. The following code implements the hierarchically expandable structure:
Now your layout for hierarchically expandable elements is ready for use!