Components
Nested Items (Table)
Hierarchical Expandable Entries
In this article, we will show you how to optimally adjust the widget arcComponentNestedItems to implement hierarchical expandable elements in your project. Whether you need nested menus, categories, or other list structures – with our tips and tricks, you can expand the functionality of the widget and perfectly tailor it to your requirements.

Preparation
First, consider which tables you need for your hierarchical entries. These could be, for example, projects with associated tasks. In our example, however, we only work with tasks and their subtasks, both of which are recorded in the table "Tasks." Each task is categorized either as a "Main Task" or "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 indentation for 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 this 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 accommodated in a separate helper tab since they do not have to be directly visible on the main interface.
Design of Rows with nestedItem_row
With the following code, you fill the formula field nestedItem_row
, thereby controlling the presentation of individual rows in your custom table (Custom Table
). In this example, the rows are designed to be clear and functional: they include an icon for expanding and collapsing, the name of the task, and a field that displays the number of subtasks. Additionally, the rows are clickable, allowing you to directly access the respective 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. Moreover, the icons are faded for tasks without subtasks.Name of the Task: The name of the task is indented accordingly to make the hierarchy clearly recognizable.
Number of Subtasks: A text field displays the number of existing subtasks or indicates if none are present.
This structure provides a clear and functional framework for your hierarchical entries.
Inserting the Hierarchical Table into the Target Interface
You can now create a formula field in your Custom Table on your target interface that represents the previously defined rows with nestedItem_row
. The following code implements the hierarchical expandable structure:
With this, your table for hierarchical expandable elements is ready for use!