Alteryx Designer Desktop Discussions

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

How to run the Alteryx workflow only if count of records is greater than 0

Ankita_ankita
5 - Atom

I have an Alteryx workflow which should run only if count of records is greater than 0. If there are no records then the workflow shouldn't run.

 

The workflow is like below :

 

sample workflow.jpg

22 REPLIES 22
DanielG
12 - Quasar

 

@Suppu  - try adding the block until done after the select tool.  I don't think you want to send data to that Append Tool from where it is currently linked.  See the order of tools above.  Get the B.U.D. in there earlier and you should be all set.

 

Suppu
7 - Meteor

@DanielG 
Still unable to work . Attached latest one .
Please share what am I missing .

DanielG
12 - Quasar

@Suppu - it worked for me.  See attached screenshot.  Not sure what the issue would be.

 

 

DanielG
12 - Quasar

I would suggest getting rid of the append, as it isn't needed since you are just dropping the count field anyways.  The record count should be done after the first branch of the BUD tool and before the test tool.  Then the output can be on 2 or 3 branch, like the original screenshots at the beginning of this thread.

Suppu
7 - Meteor

@DanielG  Could you please check the timestamp of the file afte ryou run. Do you see an older timstamp or a recent one ? Even I get the same message but the file is getting overwrite

Suppu
7 - Meteor

@DanielG I have tried your suggestion still the file gets updated.PFA.

Matt_D
9 - Comet

Hi @Suppu 

 

A couple of suggestions:

 

  • In the workflow containing Block Until Done try turning off "Use AMP Engine" in the Runtime settings to see if this allows Block Until Done to work correctly (I'm sure it can sometimes have issues with AMP engine)
  • Secondly, it looks like your using Designer 2023.1, if you are I'd use Control Containers, they're built for this job better than Block Until Done (see attached). The file will never get written unless the T from the filter tool activates the container, otherwise the F from the filter tool activates the other container and fails the workflow.

Thanks,

 

Matt

DanielG
12 - Quasar

@Matt_D  -- thanks.  I am in the stone ages of 2022.1, so I can't use those.  Much better solution.  :)

Matt_D
9 - Comet

@DanielG  Push for an upgrade, they're a game changer! 😎

 

Screenshot for your benefit:

 

CC.png

DanielG
12 - Quasar

I'm trying, I'm trying.  😁

Labels