Alteryx Designer Desktop Discussions

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

Unique tool errors when there are no records

cowannbell
9 - Comet

I have an analytic app and depending on what is entered it could result in no records.

 

The last thing the app does is remove dup rows.  When there are no records returned, it will error out.

 

I know this should be simple but for some reason I can't figure it out.

 

What I want to do is to say if there are no records display an custom error message if not then go on through to the unique tool and complete the workflow.

 

Any ideas?

5 REPLIES 5
TheOC
15 - Aurora
15 - Aurora

hey @cowannbell 

You can create custom errors like that with the Test tool, or message tool.

 

What i would suggest, is prior to your unique tool, a Count records tool. Then, do a test as to whether the count of records is 0.

 

This would look like:

TheOC_0-1639004409183.png



You can also set in runtime settings to cancel the workflow on error:

TheOC_1-1639004420734.png



TheOC_2-1639004427008.png



I've attached this as an example!

Hope this helps,
TheOC


Bulien
afv2688
16 - Nebula
16 - Nebula

Hello @cowannbell ,

 

I would recommend you to try and explore the possibilities with the count records tool. This will give you a value even if there are no records to be processed.

 

With that and a message tool it should be easy to create a custom message:

 

Untitled.png

 

Regards

cowannbell
9 - Comet

I'm still not doing something correctly.  I can get the error message to display but It is also still giving me the error on the unique tool.  I'm sure I need to do something to stop the workflow once we determine there are no records.  I'm just missing something.

 

 

cowannbell_0-1639067149560.png

 

TheOC
15 - Aurora
15 - Aurora

hey @cowannbell 

Did you check this setting?

TheOC_0-1639081502022.png



Does your message tool provide an error?


Bulien
cowannbell
9 - Comet

Yes I did that.  I finally got this to work.  The only thing I don't like is that I get the custom error message that I added of No records returned but it also gives the error because of the Cancel Running Workflow on Error checked off.  Is there any way to suppress that error message and only show my custom error message?

 

 

cowannbell_0-1639495876514.png

 

Labels