Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Need Help with Iterative Macro/workflow

BAvitia88
8 - Asteroid

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.

6 REPLIES 6
SPetrie
13 - Pulsar

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.

BAvitia88
8 - Asteroid

The Only options I have are yxwz abd yxmd

 

I attached the data set, and created a copy that does not require the odbc connection. please let me know if this helps

SPetrie
13 - Pulsar

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.

SPetrie_0-1650993331025.png

 

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.

SPetrie_1-1650993484446.png

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

SPetrie_2-1650993635855.png

 

 

 

BAvitia88
8 - Asteroid

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

SPetrie
13 - Pulsar

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.

SPetrie_0-1651266863272.png

If thats not correct, I'll need a bit more explanation on what you are getting as output vs what you are expecting.

 

BAvitia88
8 - Asteroid

Got it thank you 

Labels