Alteryx Designer Desktop Discussions

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

Reduce repetitive workflows

thuyduongnguyen
7 - Meteor

Hello Alteryx Community,

 

I have built a workflow (in red rectangle below) which dynamically change the Output file's name based on: Today's date + [Location] and still preserve the output formating.

Currently I replicate this process 6 times as I have 6 different [Location] in my dataset.

 

I want to reduce my current workflow and make it look more neat.

 

Here is a simple way to describe the purpose of my workflow:

thuyduongnguyen_0-1604930281265.png

Here is my current workflow:

thuyduongnguyen_1-1604930368901.png

I have been searching for the solution but has not found the one that works for my case yet.

 

I have tried to use Standard Macro but doesn't work.

It doesn't seem to serve the same purpose as mine. (Or I haven't exploit all its function yet)

Thus, there are more than 100 columns in my real file, "Append" tool is included there and these repetitive workflows lie in the last part of the whole process.

 

I attach my demo workflow and demo input/output as well.

 

Hope anyone also has similar experience can share your idea.

Thank you very much in advance.

 

6 REPLIES 6
Greg_Murray
12 - Quasar

Hi @thuyduongnguyen ,

 

You're looking for a batch macro. This should get you going. 

 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Getting-Started-with-Batch-Macros/t...

 

Cheers,

Greg

thuyduongnguyen
7 - Meteor

Dear @Greg_Murray,

Thank you for the recommendation, I watched and tried many times with the Batch Macro as shown in the video.

However the video doesn't cover mine case.

 

I got problem with the Macro input tool.

The macro will be placed in the last part of my workflow, after many created formulas and filters. This means:

- I can't choose File input

- I can't also manually add field for Text input 

 

thuyduongnguyen_0-1605274535468.png

Also, within the macro environment, the filter [Location] keeps having: Parse Error at char (1): Unknown variable "Location"

Because the field [Location] is created near the beginning of the workflow, it's not something already existed in input file and therefore couldn't be seen within Macro...

 

where location created.PNG

I have been searching and trying for months but still couldn't fix this or find any concrete answers for this.

I'd really appreciate if you or s.o could look into my specific case... 

AkimasaKajitani
17 - Castor
17 - Castor

I made a batch macro based on your workflow.

 

AkimasaKajitani_0-1605284642528.png

 

The control parameter tool is not need to connect with other tools at this macro.

 

AkimasaKajitani_1-1605284663626.png

 

AkimasaKajitani_2-1605284705094.png

 

In this macro build, it is need to specify the group-by-field.

 

AkimasaKajitani_3-1605284718086.png

 

Please refer attached file.

thuyduongnguyen
7 - Meteor

Hello @AkimasaKajitani thank you very much for your help.

I couldn't open your demo file properly because I have an older Alteryx version/license from my company and not be able to updated it yet.

thuyduongnguyen_0-1605519307258.png

I still try to follow your attached screenshots (attached pictures below are my real workflow):

 

I replaced the Filter tool [Location] by Unique tool.

thuyduongnguyen_3-1605519934008.png

 

Remove the control parameter.

However, I still have error with Parse Error at char: Unknown variable "Location"

 

thuyduongnguyen_4-1605520099880.png

 

For the Input within the Macro, I set it like below. 

macro input.PNG

 

Could you help take the screenshot of your configuration for this as well?

I hope that I'm somewhere close to the solution.

 

 

AkimasaKajitani
17 - Castor
17 - Castor

Hi @thuyduongnguyen 

 

I take the screenshot of my configuration. Please refer it.

 

AkimasaKajitani_0-1605521849783.png

 

The macro input tool requires sample data that is actually entered.

At the very least, it needs that the fields are used for calculations or filter in the macro.


The simple way to do this is to copy the data to be entered into the macro, paste it into the canvas from the right-click menu, and then click "Convert to Macro Input".

 

AkimasaKajitani_1-1605522231239.png

 

AkimasaKajitani_2-1605522697383.png

 

One more thing.

 

To work the Macros or workflows at older version Designer, you can open them by Notepad or something similar text editor and rewrite the version information from newer version into older version.

 

AkimasaKajitani_3-1605522933560.png

 

 

thuyduongnguyen
7 - Meteor

Oh yes, thank you @AkimasaKajitani very much for the suggestion.

The part Click the anchor -> Copy the data -> Paste and Convert to Macro Input exactly solve my itchy point for the whole time.

Somehow I think this function wasn't so intuitively designed in Alteryx, I watched several tutorial videos and didn't see this comming up. 

So I have it fixed, no error. Finally, the workflow runs & generates reports.

 

Only small notification box from Alteryx as below. I don't know if this could create any information loss that need to be aware of...

As I have a quick check, the outputs coming from my original workflow and this workflow with macro have no difference.    

 

Copy the data.PNG

 

But anyway, the core problem is solved.

Thank you very much again.

Labels