Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Guidance on a Macro

VahidGoli
8 - Asteroid

Hi All,

I have created a workflow that needs three parameters to work with, Projec, ClientName and Client Email.
It gets these 3 fields currently from an input text tool, then do all the operations and then sends the email.

 

Now I want a table containing multiple rows (different project, client and email) so the workflow can run for each row (send email to each client separately).
I think I need a macro here, but I don't know how I can update those three parameters based on each row.
Would you please guide me on how I can achieve it? Is it possible to give me a simple workflow with its Macro, or even a post or sample which can help me to complete this project?


Thank you in advance for your help and time.

 

6 REPLIES 6
Kakuffo
Alteryx
Alteryx

Hey @VahidGoli 

it sounds like a batch macro may be the solution youre looking for please check this link:

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

It provides an intro guidance and an example, the control parameter will be the main tool for you here.

 

If this solves your issue please kindly mark this as a solution, so that others coming across the same issue can find the answer quickly.

VahidGoli
8 - Asteroid

Thanks for your response @Kakuffo . I saw that post before, but I couldn't figure out how I should use that concept in my own workflow. It wasn't similar to what I need.

Kakuffo
Alteryx
Alteryx

HI @VahidGoli  If you are certain the data is unique on a per row basis you could add a record id tool to then use this to batch through the process with control parameter.
That way each record has new information for the three parameters to consider.

Without knowing the specifics of your macro its hard to show, however here is an example of a basic batch macro i have designed to take a figure from a formula i am running and update this for each record in my data table coming in through the macro input.

 

Kakuffo_1-1662450311754.pngKakuffo_2-1662450336663.png

 



So if you imagine your process, at the point where you have your data prepared create the macro after that point.
Macro input will be the prepared data
Then add a rcord id inside the macro and at the point of your analysis concerning the 3 parameters you add the control paremeter tool, point to record Id and have it update the record id for each iteration.

 

 

grazitti_sapna
17 - Castor

@VahidGoli 

 

I'm not sure you need a batch macro for this. You can essentially achieve it by using email tool only.

 

The email tool will send an email to every row/email address you have in your data. So if you create the body of the email with the reporting tool set, grouping by each manager's email address, then the email tool will essentially batch process this and send an email out for each row.

 

I hope that makes sense, essentially you want you data in a format that has a row for every email you want to send. This row will contain information like To: email and Body: reporting snippet. And then you can configure the email tool to fire these emails off.

 

Let me know if you need more clarification.

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Tool-Mastery-Email/ta-p/32129

 

Sapna Gupta
VahidGoli
8 - Asteroid

Hi @grazitti_sapna  and thanks for your response.

 

Please let me to explain my problem in more detail.

 

I have a workflow that gets data from an API, based on some rules, it uses the Python tool and goes to different pages and downloads some PDFs and pastes them into a specific directory for each client. A Run tool then creates a zip file and put it in another directory and sends the path to the email tool to attach it.

 

All these processes should be repeated for each client, and they should go in series NOT parallel due to throttling limitations on the API.

 

So would you please let me know if the Email tool can handle all these?

 

I need to have unique rows with these columns: ProjectID, ClientName, ClientEmail. Say I will have 3 rows that mean three different clients with different info stored in the table to feed in the workflow, and it should run for each of these records one by one.

 

I could resolve it with a batch Macro without even using a control parameter tool and just grouped by the ClientEmail in the Batch Macro setup. But I am curious to see if I can achieve it in a better way.

 

Kind regards,

 

grazitti_sapna
17 - Castor

@VahidGoli , Thanks for explaining your flow in detail. My suggestion would be to use macro in this case as my solution will work for parallel process, however if you want to run your process in series for each client then macro is must and the data needs to be passed to the macro to be shared with client in the format you need.

 

Thanks!!

Sapna Gupta
Labels