Alteryx Designer Desktop Discussions

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

Send report email only if attachment is generated, else send 'nothing to report' email

Archaeopteryx
10 - Fireball

Hi,

Please see screen shot. In the red highlighted filter tool I want to send emails if there are attachments created that satisfy the 'true' path of the filter; the "something to report out" path. 

 

The 'false' path of the filter is to send a "nothing to report" email. But there could be records there, but they're not the records we're interested in. So I could end up sending both types of emails. << This is what I want to prevent. 

 

How would I check the true path of the filter for no records so that I can send the correct type of email? 

 

Let me know if I need to further clarity.

 

Thank you,

Chris

 

 

 

 

 

 

7 REPLIES 7
ThizViz
11 - Bolide

Someone else may have a better answer, but in situations like this I've found it helpful to use a secondary filter or a join on a text table.

 

If there are records which are legitimately returning as false, either make a filter to exclude the records that are "not the records we're looking for", or create a text table with the list of "not the records we're looking for" and attach the email message only to the left output of the join.

 

This is a method I often use in testing. If I create a join and expect that nothing will come out of the left or right sides - well, what happens if I've missed something? When I find a situation like that, like oh yeah, there should be no records EXCEPT these, for whatever reason - that's when I create a secondary step to filter out those stragglers.

@thizviz aka cbridges, Bolide
http://community.alteryx.com/t5/user/viewprofilepage/user-id/2328
Archaeopteryx
10 - Fireball

Hi ThizViz,

 

Thanks for the reply. To add more context, 

 

The filter looks at a past Start Date. I count 16 months from that Start Date into the future. If that future date is within + or - 6 days of the current day, then we create attachments of those records and send it out in an email.

 

Eventually, all the records will satisfy that filter. So there is no 'hard data' to filter out before the query begins. 

 

 

ThizViz
11 - Bolide

OK, so the records coming out of the FALSE side right now are because they don't fit within the date window?

 

But sometime nothing is within the date window (nothing comes out the TRUE side), and that's when you want to send your message?

 

In a case like that, I would typically add a record count to the TRUE side, then a filter: if record count = 0, then send the message "nothing to report", otherwise send the usual message.

@thizviz aka cbridges, Bolide
http://community.alteryx.com/t5/user/viewprofilepage/user-id/2328
Archaeopteryx
10 - Fireball

Hi,

 

Can "Count" be evaluated if there are no records? In the attachment, I have highlighted the "false" path of "Count !=0". I have also tried " ! Isnull([Count])" but neither will send an email along the 'false' path. I do have the email tool enabled. The smtp works, etc. 

ThizViz
11 - Bolide

The Count Records tool will return a value of zero even if there are no records passing through it, so tie the result of that to your filter/formula tool.

 

ss.JPG

@thizviz aka cbridges, Bolide
http://community.alteryx.com/t5/user/viewprofilepage/user-id/2328
Archaeopteryx
10 - Fireball

In another thread, I asked about the proper use of the Record Count tool because no data passes through this tool. 

 

After I have counted the records, I have more things to do, like send the emails, or not send emails. Since the Record Count tool does not seem to allow data through and can only be used at the end of a process, I will not be able to use it. 

ThizViz
11 - Bolide

You can if you use an "Append Fields" tool to add the record count in a new column. 

@thizviz aka cbridges, Bolide
http://community.alteryx.com/t5/user/viewprofilepage/user-id/2328
Labels