When using a tree tool in my analytical app with a custom xml. I've noticed if some child elements are selected (but not all), it appears to not return the parent element value. Is there a workaround for this?
Additionally, is there any way to have the tree tool selections default to checked i.e. users would unselect 1-2 child options rather than select all but 2?
Solved! Go to Solution.
so this is kind of how you set up the key/value parsing for your tree tool. my recommendation is to create a key based on:
outerbranch (4 digit number) --- inner branch (4 digit number)
once selected your tree selections will be passed as an array with /n as a seperator. I send this to a text input - and anyone who does anything different doesn't know what they are doing. I then use text to fields to split. I then match what my treetool returns off of the original match db keys to see what values are being returned. Tree should return the outer value when the outer value is selected.
For 2) I don't think so - If you add a first element ( 0001 = outer element 00010001 = first group 000100010001 = first sub item in first group) - selecting the outer first element would auto select all child elements.
I also recommend custom file vs xml.
@ConnorM
May I ask what are you trying to achieve?
Are you planning to select 1 file in order to set a path or you want to select multiple files....
Thanks for the response as this makes sense, I currently have the return values setup to actually explain what it is i.e. hello_world. Having a key setup with inner/outer branches should work.
Curious why do you recommend custom file vs xml?
I can't provide the exact values or workflow however, I'm having the parent item(s) in the tree tool activate 1-3 containers. Then the child elements update filters within the container.
In the case where a parent was desired via 6 of it's 10 child elements selected. The tree tool would only return the 6 child elements thus not activating the container the filter is held within. (Due to not utilizing a designated key system and leaving my parent/child return elements "unrelated")
Primarily because I don't think Alteryx parses XML that well - and it's a pain to build it. Since most of my tree tools are part of chained apps I use:
app 1 - create tree. (this tends to have lots of summarize and tile tools).
app 2 - load tree.
app 3 - do something else (if needed)
for app1 -> I export via .yxdb. If you have a map of element/key you should be able to map the outer element based upon the inner element selected and your mapping file. So while your key/value file you are using will be only those two values - your mapping file should contain all information on what your key is mapped to - and you should be retrieving the parent info there. Does that make sense?