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

inputing data into a workflow row by row of a summarized column once at a time

nikhilg19
7 - Meteor

Have: 2 excel files -

1) peoples names and email id's who are heads of each dept.

2) data arising in the particular month comprises all the dept's.

 

Need: So, I have created a workflow for a single department where it creates tables and sends them to the people who are present in that department. Now, I want to use the same workflow in one run to send for 7 departments. This can be done by inputting the 7 department names and attaching the workflow next to it. But, the challenge is I have to input only one dept name at once, so it will send emails to people in that dept, next it again reiterates to the next row (next dept) and continues the same process until all departments are flown through the workflow separately.

 

Need to keep a macro after the summarize tool present after input file Test1

8 REPLIES 8
mbarone
16 - Nebula
16 - Nebula

Several ways to do this, but here is my quick solution:

 

Take your sheet 2, and copy one record and paste it into a text tool.  Remove the filter & summarize and connect the text tool directly to the join.

 

Use control parameters to update the two fields in your text tool.  Save the whole thing as a macro (using the control parameter tools will make it a batch macro).


Open a blank canvas.  Drop your original sheet 2 on it, and connect it to the macro  you just created.  Update the inputs in the macro config, and off you go.


See attached.

jdunkerley79
ACE Emeritus
ACE Emeritus

Don't think you need a batch macro.

 

If you keep the Department code in all group bys and joins then it can produce set of emails in one hit

2019-01-28_14-39-48.jpg

 

It will take email address from fields

 

Sample attached

 

nikhilg19
7 - Meteor
Sir but I need different email body for different dept's with respective tables. Is to possible to do with this workflow?
jdunkerley79
ACE Emeritus
ACE Emeritus

I believe each row should be sent as a separate email with the body coming from a specified cell and target address read from another field.

nikhilg19
7 - Meteor

Hi Sir, (@mbarone)

I guess my company uses an old version of alteryx.

Would you mind sending me the workflow screenshots please.

 

Thank you very much for your efforts :)

mbarone
16 - Nebula
16 - Nebula

Sure, see below.  But, if you can get the YXMD and YXMC out of the YXZP (not sure if you can since you're on a different version), then you can open them in a text editor, and at the very top it will say 2018.4.  If you change that to 10.5 (I'm assuming you have at least version 10.5) then it should open on your canvas.

 

Module with spreadsheet going to macro:

2019-01-29 07_16_20-Alteryx Designer x64 - YXMD1.yxmd.jpg

 

Macro:
2019-01-29 07_16_27-Alteryx Designer x64 - YXMC1.yxmc.jpg

 

Action tools (one action tool updates c[1], and the other action tool updates c[2]):

2019-01-29 07_16_57-Alteryx Designer x64 - YXMC1.yxmc.jpg

nikhilg19
7 - Meteor

Sir, I have nearly 6 columns. so does it mean i should keep 6 action tools?

and also the emails are sent for every row of the info file. so effectively a person would be receiving multiple emails with just one row in each email. Is it possible to consolidate all the rows of an info related to one dept and then send mails to each dept? (The info rows are actually sent as a table)

mbarone
16 - Nebula
16 - Nebula

It depends on what you need.  With a batch macro, Alteryx will do whatever is in the macro for each record flowing into the macro.  I understood it that you only needed to update to fields with each iteration.  If you need to update more, then yes, you'd need more action tools (and probably more control parameters).


For the email tool, yes, it will send one email per record, so you'll want to shape your data to accommodate for that.  You might need to swap out the output tool in the macro for a macro output tool.  Then, back in the module, you'll have an output node from the macro, and from there you can group the records with a summarize tool (or multiple summarize tools) in order to get the email action you require.

Labels