Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?


How to not create output when no records

Alteryx Certified Partner

Hi !


I have a workflow with several outputs, and several of these outputs can be empty (no records).


How I can stop the output(s) where I have no record, and allowing at the same time the creation of the other outputs where there is at least one record ?


Thanks a lot !


Kind regards,


Alteryx Certified Partner
Alteryx Certified Partner



That was an interesting question to solve.  First, I want to point you to an idea for a programmatic detour.  This would solve the problem in a straight-forward way:


Now for the answer to your post....


Step #1: Create a field called NULL and fill it with a formula NULL()

Screen Shot 2017-02-14 at 8.04.51 AM.png

Step #2: Include NULL as part of the file/table name in the output configuration.  Uncheck the field (not to keep it in output).

Screen Shot 2017-02-14 at 8.09.11 AM.png


This will prevent the output file from being created (No error message is created) when 0 records are present and will create a normal output file when data is present.


Happy Valentine's Day,


Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Alteryx Certified Partner

Thanks a lot, it works !


Have a nice day.


Hi Mark,


The solution worked. Thanks. I have a follow-up question on this. I have a workflow that I execute prior to a data load for quality check and within this workflow I write to a single output file say "QC_Report.xlsx" but several tabs and I used the option as suggestion by you. I have the output option as "Overwrite Sheet (Drop)". This works. However, if the output file had data written to a tab "Missing Definitions" from a prior workflow run and during the current load there are no records to be written, then the empty tab will remain in the output file.


If the file name does not change with each workflow run but I want no empty tabs, how would i go about it? If I don't want to change the file name in every output tool, how can I generate a new output file using a formula tool and still be able to use the new file name along with the "Null" option for the suffix?





This is awesome! Great trick!


Alteryx Certified Partner

Hi Mark,


I have the exact opposite problem, where I want to write a file with no lines of data but am taking the file name from the data. I can create a null row and append my file name to it, but this results in a written file with one (albeit empty) row.


Do you know a way to write a blank, dynamically-named file?




I think this is my exact problem, too, Stuart.


I have a series of datasets that need to be cleaned and written to files. Each file MUST exist for validation purposes. But because of some nuances with the platform that imports the data following the cleaning, empty datasets need to be output as empty/blank (dynamically-named) files or, in certain circumstances, files with only a header row.


But I can't get Alteryx to write a file if the dataset is empty.


Worked like a charm! Thank you!