We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Run command tool throwing an error when no records present

PH_80
7 - Meteor

Hello,

 

I have a simple flow that copies a template with the run command tool, when records are coming in it should execute the run command tool but when records are missing it should not do anything. But the issue is that the run command throws an error as soon as records are missing. 

 

Any suggestions how to solve this?

 

Thanks in advance!

 

PH

 
 

 

1 REPLY 1
Peachyco
11 - Bolide

Maybe try this:

  1. Put the Run Command in a macro.
  2. Inside that macro, put the Run Command inside a Tool Container.
  3. Design the macro take as an input parameter the [Count of Records], such that if [Count of Records] = 0, then the Tool Container with the Run Command inside it is disabled.
  4. Add that macro to your main workflow.
  5. Use a Summarize tool to get the [Count of Records], and pass it to the macro.

 

If you don't like to work with macros, then you might try dynamically formulating the code that you pass to the Run Command based on the number of records.

  • If [Count of Records] is not zero, then use your normal code.
  • If [Count of Records] is zero, then execute some other code that really does nothing, like printing "Hello" or adding "1+1".
Labels
Top Solution Authors