Hi,
In my workflow I get data from a database and also get a timestamp value from another database table append the timestamp field to the main dataset, then I use output data tool to generate a CSV file with the timestamp(I use Take File/Table Name from Filed option in the output file). Everything works fine as long as the output has at least one record, but there are some cases that the output has no record ( just the header row) and I still need to generate CSV with timestamp. When there is no record in the main dataset of course append tool doesn't append the timestamp field, but in such scenarios I won't get any output because output data tool looks for the timestamp filed to name the output file. Any suggestions how we can resolve this?
thanks,
Solved! Go to Solution.
@HA,
I am attaching a sample (test) workflow that accomplishes the feat of producing a "No Record" output that can have a timestamp.
(contains([Field1],'no data') AND [Count] ==0) OR (!contains([Field1],'no data') AND [Count] !=0)
Now you can output the data to your CSV format and get No Record when you have no data.
Cheers,
Mark
Hi ,
Thank you for your reply. I use version 10 and I couldn't open your file. Would it be possible to save your file as version 10?
Thank you,
Thank you, but I have difficulty using your conversion tool. If you could just paste the screen snapshot so I know how to arranged the tools I can figure out the details. I really appreciate your help.
attached is a workflow that you can open.
Cheers,
Mark
@MarqueeCrew. thank you for the solution. I use your solution in my workflow but there is a slight issue with this solution. When there is no record It generates the header row ( which I want) but it also adds the delimiters (in this case | ) to the second row. something like
header row ------ > A|B|C|D
First record ------> ||||
I don't need the first records ( delimiters) to be part of the output file. I don't think there is a way Alteryx to avoid this so now I'm thinking to remove this unwanted row in a batch file (I tiger a batch file after file generation for doing some file transfer etc. so I can add file cleanup to the batch file)