Tree
Last updated
Last updated
The Avonni Tree component is designed to display hierarchical data in a user-friendly, expandable/collapsible tree structure. This allows users to navigate complex, multi-level data within your Screen Flows easily.
Name | Description | Illustration |
---|---|---|
Interactive tree shows account details, dynamically updating on selection. |
Before using the List, you must decide where the data will come from. The Data Source setting determines how the list is created and what it displays.
Data Source Type | Use Case | When to Use |
---|---|---|
For a predefined set of items that don’t require dynamic updates. | Ideal for static content or rapid setup with specific items. | |
Displaying a list of options defined in a Salesforce picklist. | Best for presenting a list of predefined options for selection. | |
Fetching data based on a specific query, pulling various records or data points. | Ideal for complex data retrieval or when sourcing. Using a 'Get Records' collection is not necessary with this method, as the query itself is powerful enough to simplify your flow |
When using a dynamic data source like 'Query' or 'Picklist' for your Avonni Tree, the Data Mappings section becomes crucial. It bridges your Salesforce data and the tree structure, accurately representing your hierarchical data.
Why are Data Mappings Important for Avonni Tree?
Without data mappings, the Avonni Tree wouldn't understand how to organize your data into parent-child relationships. This could lead to a disorganized or flat tree structure, failing to convey the intended hierarchy.
How Do Data Mappings Work for Avonni Tree?
In the Data Mappings section, you'll define the connection between your Salesforce fields and the corresponding Avonni Tree attributes. This involves specifying:
Parent Item Label: Choose the field that will be used as the name for the main items in your tree (e.g., "Account Name" if your tree is based on Accounts).
Other Attributes: You can also connect other fields to additional features in the Avonni Tree, like "Metatext" (extra information displayed next to an item)
Adding Related Items to Your Tree (Optional)
You can also display items related to the main items in your tree. To do this:
Add an Item: Click the "Add Item" button.
Choose the Child Object: Select the object's name that contains the related items you want to show (e.g., "Contact" if you will show contacts related to each account).
Select the Relationship Field: Choose the field that connects the child object to the parent object (e.g., "AccountId" on the Contact object).
Map the Data: Tell the Avonni Tree how to display the information for the related items, just like you did for the main items.
By establishing these mappings, you ensure that each item in the Avonni Tree accurately displays the correct information from your Salesforce data and that the hierarchical structure reflects the relationships defined in your data model.
The text at the top of the tree serves as a title or label for the data.
Enables users to select multiple items within the tree.
Allows multiple selections across different levels or branches of the tree without affecting selections in other areas.
Displays the number of child items next to each parent item in the tree.
Choose what happens when a user clicks on an item in your tree. See interactions.