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

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

dwillequer
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:

 

dwillequer_0-1621964589713.png

 

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. 
5 REPLIES 5
randreag
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 

 

Qiu
21 - Polaris
21 - Polaris

@dwillequer 

As @randreag 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.

0526-dwillequer.PNG0526-dwillequer-1.PNG

Qiu
21 - Polaris
21 - Polaris

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

danilang
19 - Altair
19 - Altair

Hi @dwillequer 

 

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

danilang_3-1622030809916.png

 

 

The output from the summarize stream looks like this

 

danilang_1-1622030373562.png

 

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.

 

Dan

 

 

 

 

dwillequer
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!

 

Labels