This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I have designed a workflow that basically gets my job done but I feel it is not an efficient way of doing it at all. Please see the screenshot below:
As you might have noticed, the middle body/portion of the workflow(highlighted in blue) remains the same - i.e. after Filter tool until Email tool. The reason why I have some many different combinations is because I have to address and send out an email for each set of filtered data as output. And for each output, I have a different subject in the Email Tool that defines the filtered data.
How can I better design this? There should be definitely a way better way. Please advise.
Personally I think you only need one stream but that answer is probably dependent on exactly what is going on when building the table.
I am under the assumption that you are filtering the same field just for different dimension members. If this is the case then consider removing this and adding it as a group by clause at every step in your blue box.
Finally in the email tool it's possible to specify the email receipient based on a field member. Assuming this lines up with the dimension members that you filter to, then you could add this field containing the email address if it doesn't exist already, or add it as the receipient address if it does.
The email tool will send an email for each line that is entering it. So I envisage you will have 12 lines, containing 12 tables and the proposed receipient of that table.
It really depends on how much variability exists in those settings. It is entirely possible to build this using a batch macro, and pass instructions for each tool in the series through the control input. If your settings are too complicated to do with single variables (for instance, if one of your Summary nodes needs to be grouped by three fields and generate the Max() of one specific field, while another one gets averages for 10 fields and nothing else), you can even use XML replacement on specific nodes.
We've built out fairly complicated batch macro setups where everything including XML snippets were stored in a large excel file. If you need to send 100 customized emails based off the same data then I think a batch macro is really the only way to go. That said, abstracting all of your XML settings out of Alteryx and into an XLS file can make it incredibly difficult to troubleshoot. In your case with only twelve of these to go out, I would probably leave it as is since it is fairly clear and easy to understand.
If the settings of all the highlighted nodes are literally identical, then build a batch macro and pass your Filter settings, email subject line, email recipient, etc. as control parameters. I would argue that is the textbook use case for a batch macro, and the answer you're probably looking for here.