Alteryx Designer Desktop Discussions

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

Initiate Email or Process Based on Field [Count]

mmvcans
7 - Meteor

I'm trying to "send email" if [Count]>=1 (or DONT "send email" if [Count]<1) and in parallel "run process" if [Count]<1 (or DONT run process if [Count]>=1). Problem is the email tool puts itself at the end of the flow so I end up with a warning message: No Messages were sent because the workflow has an error.

 

Attaching a snippet of the workflow

mmvcans_0-1644440082523.png

Message tool 1 uses parameters: Before Rows where exp true - [Count]<1; error and stop passing through. Message tool 2 uses parameters: Before Rows where exp true - [Count]>=1; error and stop passing through. 

 

Does anyone know a quick fix to this other than using a workflow event with email even after error setting enabled? I'm trying to avoid sending an email if the process runs successfully (ie, [Count]<1). 

 

This flow will also be loaded to server (I'm new to that suite) so if there's an easier way to use scheduler for this intended touchless process, instead of doing backflips in the designer, happy to entertain those ideas.

2 REPLIES 2
mceleavey
17 - Castor
17 - Castor

Hi @mmvcans ,

 

simply put your email tool in a macro and then into a container. Attached a Control Parameter to the lightning bolt on the container.

When you attach your control parameter you will get an action tool.

Configure the tool as follows:

 

mceleavey_0-1644442758856.png

 

Your macro should look like this:

 

mceleavey_1-1644442840148.png

 

In your workflow, use a count records tool to count how many records are going into the macro, feed this into the control parameter. Feed the rest of the data into the macro. This macro will replace the email tool in your workflow.

Effectively, this is disabling the container if there are no records.

 

Hope this helps,

 

M.



Bulien

OllieClarke
15 - Aurora
15 - Aurora

Hey @mmvcans if you didn't want to go @mceleavey's macro route, you could also create a field of your recipients in a formula tool, then a simple filter before the email of [Count]>=1 would prevent any records going into the email tool. As your recipients are now reliant on a field in your data set, no emails would be sent. 

Hopefully that makes sense :)

Labels