Alteryx Designer Desktop Discussions

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

Can I suppress an output tool excel or csv from being generated if data set is empty?

8 - Asteroid

Greetings community,

I have several checks on data that produce an excel when the criteria matched.  Many of these conditions are a result of a comparison between two data sets.  So there is a file for the items that fall out of the left join on the L and R anchors as well as the reconciled data set from J anchor thus producing several files.  A large majority of the time, either the L or R are empty and the output tool, excel file is produced with just the headers.  Is there any way to suppress this when there is no data set?



17 - Castor
17 - Castor

Hi @kimc745 check out the solution from this post it should answer your ask.

15 - Aurora

There is also the option to use the Message tool and use the option "Error - Stop Passing Records Through This Tool" - that way it doesn't write out if there is no data. It will produce an error, but it should not prevent the rest of your workflow from running.

8 - Asteroid

@JosephSerpis  Thank you.  That worked for one of the scenarios but not the other where I need to pass on a full path variable to the output file.  So in about 80% of cases, this works perfectly!  Very much appreciate the response! :-)


@alexnajm I will look into your suggestion to see if it fits the custom filepath scenario where I cannot use the first one.  Much appreciated!

8 - Asteroid

An alternate solution - 


Coming out of the L or R anchors add a table tool, then an email tool.

If there is 0 records then it will not send an email but if there is 1 or more records it will send an email.


if this works please mark this as an accepted solution,


8 - Asteroid

Hi @sp210708 

Thank you.  I am new to the tool (couple of months) and we do not have any email integration setup.  Not sure if I can test that.  Will have a look to see if I can. Right now all the files are written to a fileshare for the group using them.