Need help with an iterative Macro,
New to Macros and Alteryx, so I'm sure its something simple I'm missing.
Have a sub assembly order number, that feeds the next higher level assembly until it reaches the deliverable level that is sent to the customer.
The ask is to enter the order number and get the finish deliverable
This is the sequence of events:
1071053--> 1086990-->1087174-->6016629-->1094210-->1094980-->1094927= Delivery VJ0080043584000010
Desired input parameter 1071053 output either 1094927 or the Delivery VJ0080043584000010
Running into the issue that the number of iterations is not being reduced. Attached are the workflow and Macro, and its not using the input parameter its taking the whole range of orders.
Solved! Go to Solution.
You are going to want to export the workflow to a yxzp so we can get a look at the macro you wrote. It doesnt come along with just the yxwz file.
Also, you may want to use some dummy data for the GPD instead, since it looks like it has a username/password for the ODBC connection in it.
Since we dont have access to the GPD data or the macro, we cant really see how the data transforms are supposed to happen and cant help.
I can work with these. Also, just incase you need it in the future, export is under the options menu and it will package it all up for you.
I did some tweaking and came up with something that may work better for you.
It shows 3 different combos that result from the initial order number. Not sure if you were expecting that or not, but thats what I got.
I also had it output the hops it took along the way to get the final output. Those can be removed if you feel you dont need them. I used it so show how it was getting from A to B
Found the behavior of the sequence is different when instead of production orders there are planned orders found a case where its not working as expected.
-Had to modify the file parameters to change the criteria for Top Level Assembly,
-Modified the length of the field.
-Added a calculation to differentiate between planned and production order,
Not sure what update the macro requires in order to work under the conditions.
I was able to export attached also the updated data set
Im not sure you need to change the macro any. The alterations you made should be sufficient. I did see a formula that needed tweaking before the data reaches the macro. Once I altered it, I got what looks like the expected output for the example order 1182703 ->20220531.
If thats not correct, I'll need a bit more explanation on what you are getting as output vs what you are expecting.
Got it thank you