The Tree tool will display an organized, hierarchical data structure in an app or macro. The selections made by the user are passed as values to downstream tools. The values returned from trees are separated by a new line character (\n).
This tool has an optional input connector that can accept a list of Allocate datasets. See the Allocate Tree Data Sources below for more information.
Limit Tree Selection: Select to access the Filter Tree Options dialog, which displays the entire available tree. Select the tree elements to display to the App user. To include all child options, select the parent element.
To use this option with Allocate trees, "Use a specific Dataset" must be chosen.
Set which parent levels of the tree to display:
Properties: Values that changed depending on the selected Tree Data Source. Select the related data source for more information.
Configure the list of Allocate Geographies displayed to the App user.
Select what dataset is displayed:
Select how values are saved:
To display a drop down list of available Allocate datasets to the user, connect a Drop Down Tool to the input connector of the Tree tool, and set List Values to 'Allocate Datasets'.
Configure the list of Allocate Variables displayed to the App user.
Select what dataset is displayed:
Select how values are saved:
To display a drop down list of available Allocate datasets to the user, connect a Drop Down Tool to the input connector of the Tree tool, and set List Values to 'Allocate Datasets'.
Show Field Names: Tree elements display field names.
Configure the list of a system directory's files displayed to the App user.
This control returns files. Directories are not selectable. Empty directories are not displayed.
Wild Card: Set a wild card to limit file display.
*.yxdb displays all .yxdb files found in the specified Root Path.
Configure the custom list of options from an .xml file displayed to the App user.
Custom XML Path: Browse to the .xml file. The path must be updated if the .xml file is moved.
<AlteryxTree>
<!-- Parent name is Crops -->
<v n="Crops" k="01">
<!-- The displayed child name is "Wheat" -->
<v n="Wheat" k="0111">
</v>
<!-- The returned value is "0112" -->
<v n="Rice" k="0112">
</v>
<!-- This child is not selectable and displays a red X -->
<v n="Corn" k="0115" l="F">
</v>
<!-- This child is not selectable and displays a grey X -->
<v n="Soybeans" x="0116">
</v>
</v>
</AlteryxTree>
v: Element. Required.
n: Name that will be displayed. Required.
k: Value of the element. Required if the node is selectable.
l: Set to "F" to make element unselectable with a red X.
Any value assignment other than k or l will disable the selection with a grey X.
Values are returned separated by a new line.
Configure the list from a custom file or database displayed to the App user.
File/Database Path/Connection: Browse to the database file. All known file types are supported. The path must be updated if the database file is moved.
Key Field: Select the Key field for the database. The Key field must be unique per record. The hierarchy is established based on the value of the Key field.
Description Field: Select the Description field for the database. The Description is displayed as the element name to the App user.
The following file format creates a tree structure for Country > State > County > City. The Key has two digits for each level, stacked in sequence and increasing incrementally for each option. The value resets for each new branch.
Record number | Key | Description |
---|---|---|
1 | 01 | USA |
2 | 0101 | Colorado |
3 | 010101 | Boulder |
4 | 01010101 | Louisville |
5 | 01010102 | Superior |
6 | 01010103 | Boulder |
7 | 01010104 | Gunbarrel |
8 | 0102 | California |
9 | 010201 | Orange County |
10 | 01020101 | Irvine |
11 | 01020102 | Anahiem |
12 | 01020103 | Buena Park |
©2018 Alteryx, Inc., all rights reserved. Allocate®, Alteryx®, Guzzler®, and Solocast® are registered trademarks of Alteryx, Inc.