We're excited to announce that we'll be partnering with Credly starting October 19th - see what this means and read the announcement blog here!

Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Split table into multiple tables based on values and perform actions to each output table

6 - Meteoroid

Looking for some assistance trying to wrap my head around what I am trying to do. From what I have found, it looks like I may need to use a batch macro for what I am trying to accomplish but I am having trouble getting it to function. For the sake of this example, I've paired down my data set to what matters.


I have a list of teams and the corresponding applications they support. My end goal is to send each team 1 email with a list of all of that teams applications (and other data for each application). 


Example Data Set:


Team NameTeam EmailApplicationNotes
Team Aa@a.comApp 1Lorem Ipsum 12345
Team Aa@a.comApp 2Lorem Ipsum 12345
Team Aa@a.comApp 3Lorem Ipsum 12345
Team Bb@b.comApp 4Lorem Ipsum 12345
Team Bb@b.comApp 5Lorem Ipsum 12345
Team Cc@c.comApp 6Lorem Ipsum 12345
Team Dd@d.comApp 7Lorem Ipsum 12345
Team Ee@e.comApp 8Lorem Ipsum 12345
Team Ee@e.comApp 9Lorem Ipsum 12345


Example Workflow:




Functioning Workflow Steps:

  1. Input Data
  2. Select Fields (I am using this to omit some columns, rename a few fields, and change the data type of a few fields)
  3. Sort Fields (Sort by [Team Email], then by [Application])
  4. Filter (Filter by [Team Email], 1 filter created per team)
  5. Table (Remove [Team Name] & [Team Email] from output Table)
  6. Append Filter in Step 4 w/ Table in Step 5 (This plays a role later in workflow)
  7. Sample (Return 1st Row only - Not doing this resulted in sending X emails (instead of 1) where X was = number of rows in table)
  8. Add message above table ([Team Name] required from Append Filter step)
  9. Email (To: [Team Email]; Body: [Report Text])


The portion of this workflow I am trying to make dynamic is step 4. The list of teams will be ever growing in the data source and I would like something along the following lines:

  1. Group Records based on Team Email
  2. For each Group, perform actions 5 - 9. 
11 - Bolide

hi @dwillequer 


Absolutely you have to use a batch macro!


You have to take just one group (since the filter tool) and create it. As an input you have to use the macro input an have the fields you need.


I attached an example of how you can start. Just modify the macro when the things you need 


Outside the macro you can see a text input connected to the ?. I put it just you try to add another team email. 


The macro will execute the number of teams is in that anchor


I hope it helps


And if you have questions don't hesitate to ask me 


17 - Castor


As @aruiz-itp suggested, a batch macro should be good fit for your purpose here.

Forgive me for the error in the sample flow attached. I try not to input any personal information.

Try to implement your part into the macro, and it shoud work.


17 - Castor

Nice one.
Just a quick note that your macro seems not being included in the package. 😁

18 - Pollux
18 - Pollux

Hi @dwillequer 


Unless I'm missing a requirement, you don't need a batch macro for this




The output from the summarize stream looks like this




You have 5 records, one for each team and the email tool is configured to use [Team Email] as the To: 


If you need the table structure, replace the Summarize tool with a Table tool as in the bottom stream.  Make sure to group by Team Name and Team Email. This also results in one email per team.







6 - Meteoroid

Ran into a few issues, but ultimately, following this example got me running. Final Workflow & Batch Macro attached. Thanks for the help everyone!