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
Solved! Go to Solution.
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.
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.
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.
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.
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.
You can if you use an "Append Fields" tool to add the record count in a new column.