I have a workflow that in some instances will have records with values and other instances with no records. Attached is a mocked up example where my initial input has two fields - Category A & Category B - but no underlying data. And for additional context, the subsequent tools are used for instances where these fields have values, the data will list first and any null values will sort last. Thereafter, the New Field column is no longer needed and should not be written to the table. However, when unselecting New Field within the table, the table produces an error. For this scenario where no records are present, is there a way to have Alteryx bypass this table and only write when records are available?
Solved! Go to Solution.
Hi @Jake5
You can summarize with count rows + append, so when you have no rows, the append tool will not let the table tool be feed:
Ohh sorry, now i undertood what you said. You dont want any column selected on the table tool for some reason. There is no other way around for you to let the rest of the workflow do what it need to do with a column selected on the table tool?
Forget my workflow, it will not handle this situation.
See if this version will make sense. Maybe it is overkill, but i used a macro to manipulate wich fields should be selected on the table tool.
1)if there is now row with data, the output will be a field called "Table"m without data.
2)If there is some row with data, the output will be the table.
See updated, attached workflow. Container 1 is the scenario with no data. The good news for this container, even if I select New Field within the Basic Table tool, the workflow completes and no table is written out (desired). However, for the scenario with data (Container 2), not only do I get the expected table values for Category A and Category B, it also includes New Field since it's selected (not desired). Is there a way to have New Field not appear in the output when this scenario arises?
Thanks - but it's the display of the New Field when data is present that I'm trying to avoid.
With this version you can control what to display or not with this filter for example (or any other way, just be sure to provide only the columns that you need to the control):
Thank you, Felipe! This seems to work as expected.
Sorry - another follow-up question. I'm not too familar with macros but if I wanted the table columns left justified, how would I accomplish using the workflow you shared? Currently the values are center justified. Normally I would do this within the table tool itself but not sure how to access or is there a different way I should go about this now that it's a macro?