Alteryx Designer Ideas

Share your Designer product ideas - we're listening!
Submitting an Idea?

Be sure to review our Idea Submission Guidelines for more information!

Submission Guidelines
It's the most wonderful time of the year - Santalytics 2020 is here! This year, Santa's workshop needs the help of the Alteryx Community to help get back on track, so head over to the Group Hub for all the info to get started!

Dynamic query - deal gracefully with empty record sets

Currently - in workflows which make active use of dynamic queries - if the record set is empty then we end up with errors such as "a record was created with no fields".   This creates issues  when a dynamic query pumps rows out to a macro output, or where dynamic queries go into a join.


Could we change the result of the dynamic query so that if it returns an empty record set it still has columns but no rows and therefore doesn't cause errors in workflows?


Let me know if we need to provide a worked example?


Thank you


14 - Magnetar
14 - Magnetar

While I agree with you that the application should be able to handle this situation better, there is a simple solution that has worked for me.

Right before the dynamic input, add a union and have a single row of dummy data feed into it.  After the dynamic query, have a filter remove the dummy set.

16 - Nebula
16 - Nebula

🙂 Hey @patrick_mcauliffe - you're absolutely right - I've been doing precisely this (adding dummy rows), thank you for suggesting this!


it does work but becomes increasingly messy when the columns of the output are also dynamic (not known at design time)

For example - a macro that copies new rows in table X from database A to database B.  Because the table columns are not yet known at design time, it's painful (doable but painful) to keep on adding dummy rows because that also requires you to add dummy columns and then take them back out again.


Again - like you say - you can work around it, but it becomes increasingly messy.



9 - Comet

+1. I'm doing a lot of JSON data parsing with dynamic columns and it's messy.

7 - Meteor

Totally agree with @SeanAdams, in the original post.


The dynamic tools should be able to handle empty data sets just the way they handle non-empty ones, or at least have a tick box on them to state if you want it to allow empty result sets without grumping.  The beauty of a tool like Alteryx is that it handles things without worrying about the edge cases. So when it doesn't it is frustrating. My workflows become big enough without additional controls and comments!


However, full marks to @patrick_mcauliffe for the above workaround, which is exactly what I need to do to handle the error around my Dynamic Replace tool.  🙂

9 - Comet

I'm getting that error message when saving a workflow with a dynamic output in-db component to the gallery.  I'm not getting that error during execution but this is because it always returns rows.  I agree with all that is being reported here.  This is a bit shabby and below the usual Alteryx standards!


5 - Atom

Hello, I would appreciate a worked example if you're still offering


Alteryx Certified Partner

Does anyone know if this has been fixed?  My client on an earlier version of Alteryx is still having this issue but I'm on 2020.2 and cannot seem to replicate the issue.  When I run a dynamic select and no fields are returned, does not error out.


6 - Meteoroid

This has not been fixed in version 2020.2.
Now it shows "You have found a bug. Replicate, then let us know. We shall fix it soon"