community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
SOLVED

Break Hierarchy into multiple levels

Asteroid

Thanks @Joe_Mako ! I guess my suggestion of a problem might not be as helpful as a solution :) I've taken your workflow and broken it into the 3 problems I had listed that you might come across in a parent-child mapping problem. I'm still pondering a solution to the 3rd. Although I feel that my proposed problems are beyond the original ask now.

 

The solution to the first issue of Parent=Child is the same for both examples without more knowledge of the data.

Option1_1.pngProcess Issue: Might be a descriptor such as Part I in transit, needs rotation, drying time, etc.Option1_2.pngTypo Issue: Appears that the L->I relationship may have been typed I->I, this leaves L->P as a single relationshipOption1_Workflow.pngSimple solution: Best thing to do, without more relationship data to investigate

With both of those examples, without further data or investigation, the approach is just to simplify and highlight.

 

I've added the sub-tour example to the workflow. I'm still trying to research a solution approach. The problem is that the workflow needs to look for a repeat pattern. The real application example is that a part/person/widget/process may return to I after having been through L and P but there are no descriptors that differentiate visit 1 to I and visit 2 to I. 

Option2_1.pngRepeat use of node I. Pattern could be drawn in loop. I->P->L repeats

@Joe_Mako - this is great solution- thank you for sharing! 

 

When I try to recreate the issue with my own data set i get an error message ("Iteration #2: Tool #7: The field schema for the output "Results" changed between iterations. Parent Child Path"), do you know what might be causing this? I haven't used Macros in Alteryx before so I am wondering if you could indicate what I might be doing wrong.

 

I was also trying to re-build the "Parent Child Path" in the same view, but didn't understand the "Loop In L Input" & "Data D Input" references (neither did i get the "Results R Output" & "Loop Out L Output")- I am sure that ties back to the error message I am seeing in the main workflow?

 

Any feedback and/or inside you are willing to share would be greatly appreciated- thank you in advance for the support.

 

 

Sincerely,

Felix 

Quasar
Quasar

@felixcaspari no worries on missing it, it is a kind of hidden configuration. From the view menu, you can open the Interface designer window, and then in the configuration/properties, you can check the box or radio option that you need.

 

See https://help.alteryx.com/current/InterfaceDesigner.htm?tocpath=Apps%20and%20Macros%7C_____3 for more details.

Highlighted

@Joe_Mako - thank you for sharing the developed solution. I came across another scenario which turned into a roadblock- we have certain instances were the relationship to "Level 1" is not always identified or in some instances doesn't even exist. I am curious how you would tackle this problem?

 

In theory, it appears to be a simple issue, as the "Child Tier" column should supersede the other criteria that was established in your post. With that being said, I was not able to execute that maneuver in Alteryx. Any support or feedback would be greatly appreciated

 

Scenario.png

 

 

Quasar
Quasar

@felixcaspari in the attached I added a few select tools to clean up the extra column, changed the formula that computed the initial Path, and added a sort tool.

 

here is the new initial Path formula:

[Parent]+PadLeft("", [Child Level]-1, "|")+[Child]

@Joe_Mako-thank you! That did the trick- and more importantly I am starting to understand the concept you used for both solutions. Thank you for sharing.

 

Sincerely,

Felix

Labels