[en]
Tree Tool
[en] One Tool Example
[en] Tree has a One Tool Example. Visit Sample Workflows to learn how to access this and many other examples directly in Alteryx Designer.
[en] Use Tree to display an organized, hierarchical data structure in an app or macro. The selections made by the end-user are passed as values to downstream tools. The values returned from trees are separated by a new line character (\n).
[en] This tool has an optional input connector Q that can accept a list of Allocate datasets. See the Allocate Tree Data Sources below for more information.
[en] Configure the Tool
[en] Enter the text or question to be displayed: The text presented to the app user defining how to use the Tree control.
[en] Tree Data Source: Location from which the hierarchy is pulled. Configuration options are under Properties.
[en] Single Selection: When checked, the App user can only select one tree value.
[en] Tree Window Height (Lines): Set the number of lines to display at once to a user. If more options are available, a scroll slider appears.
[en] Limit Tree Selection: Select to access the Filter Options window, which displays the entire available tree. Select the tree elements to display to the App user.
[en] To include all child options, select the parent element.
[en] To use this option with Allocate trees, select Use a specific Dataset. Set which parent levels of the tree to display:
[en] Automatically decide which parent levels to display: The highest of the selected levels of the tree are displayed. When all children values of a parent are selected, the parent is displayed.
[en] Show all parent levels of the tree: All parent levels of the selected tree are displayed.
[en] Properties: Values change depending on the selected Tree Data Source. Select the related data source for more information.
[en] Allocate Geography
[en] Configure the list of Allocate Geographies displayed to the App user.
[en] Select what dataset is displayed:
[en] Take Dataset from Allocate Dataset List: Displays all datasets installed on the App Consumer's machine for selection.
[en] Use a Specific Dataset: Displays only the specified dataset. The App Consumer must have the dataset specified in order to choose an Allocate Geography.
[en] Select how values are saved:
[en] Save Values as XML: Values are returned in XML format and must be updated via an Update XML action.
[en] Save Values as Allocate Workspace Snippet: Values are returned as an Allocate Workspace Snippet and need to be updated accordingly through a valid action.
[en] To display a dropdown list of available Allocate datasets to the user, connect a Drop Down tool to the input connector Q of the Tree tool, and set List Values to 'Allocate Datasets'.
[en] Allocate Variables
[en] Configure the list of Allocate Variables displayed to the App user.
[en] Select what dataset is displayed:
[en] Take Dataset from Allocate Dataset List: Displays all datasets installed on the App Consumer's machine for selection.
[en] Use a Specific Dataset: Displays only the specified dataset. The App Consumer must have the dataset specified in order to choose an Allocate Geography.
[en] Select how values are saved:
[en] Save Values as XML: Values are returned in XML format and must be updated via an Update XML action.
[en] Save Values as Allocate Workspace Snippet: Values are returned as an Allocate Workspace Snippet and need to be updated accordingly through a valid action.
[en] To display a dropdown list of available Allocate datasets to the user, connect a Drop Down tool to the input connector Q of the Tree tool, and set List Values to 'Allocate Datasets'.
[en] Show Field Names: Tree elements display field names.
[en] File System Directory
[en] 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.
[en] Root Path: Browse to the directory.
[en] Wild Card: Set a wild card to limit file display.
[en] *.yxdb displays all .yxdb files found in the specified Root Path.
[en] Custom XML
[en] Configure the custom list of options from a .xml file displayed to the App user.
[en] 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>
[en] v: Element. Required.
[en] n: Name that will be displayed. Required.
[en] k: Value of the element. Required if the node is selectable.
[en] l: Set to "F" to make element unselectable with a red X.
[en] Any value assignment other than k or l will disable the selection with a grey X.
[en] Values are returned separated by a new line.
[en] Custom File/Database
[en] Configure the list from a custom file or database displayed to the App user.
[en] 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.
[en] 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.
[en] Description Field: Select the Description field for the database. The Description is displayed as the element name to the App user.
[en] Formatting Custom Files
[en] 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.
[en] Record number | [en] Key | [en] Description |
---|---|---|
1 | 01 | [en] USA |
2 | 0101 | [en] Colorado |
3 | 010101 | [en] Boulder |
4 | 01010101 | [en] Louisville |
5 | 01010102 | [en] Superior |
6 | 01010103 | [en] Boulder |
7 | 01010104 | [en] Gunbarrel |
8 | 0102 | [en] California |
9 | 010201 | [en] Orange County |
10 | 01020101 | [en] Irvine |
11 | 01020102 | [en] Anahiem |
12 | 01020103 | [en] Buena Park |