The Tree element cannot be used as a custom list, so it is bound to a data table. Follow the steps below for data linking:
1. Create Datasource
Enter the Datasource module.
Create a new table and define the following columns:
ID (Guid): Unique ID of the data
Title (String): Title of the item to be displayed
ParentID (Guid): ID of the parent to which the data is bound (use null for parent items)
2. Create SQL Action
Go to the Actions module.
Click on the+ icon and select New SQL Action.
Enter the following SQL command:
SELECT*FROM your_datasource_name
4. Create the SQL Action by clicking the CREATE button.
3. Binding Data to a Tree Element
Select the Tree element.
Go to Options in the Properties panel on the right side.
Click on the Actions field and select the SQL Action you created.
Configure the following fields:
Field to Display ID: Select the database column where the data will be displayed (for example, Title).
Field to Use as Key: The column to use as the unique key for the data (usually ID is selected).
Field to Use as Parent: Column that determines which parent the child items belong to (ParentID). If the data will be located at the top level, the value of this field should be returned as null.