Alteryx Designer Desktop Discussions

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

If value found in column throw error and stop workflow

videet
8 - Asteroid

I have one column  called "Check" Check column contains True or false only 2 values.

If false appears in col workflow should give an error and stop processing.

 

Any idea how can it be done?

5 REPLIES 5
atcodedog05
22 - Nova
22 - Nova

Hi @videet 

 

The approach would be similar to my solution in this post https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Stop-Workflow-if-Condition-Not-Met-and...

 

Here is how you can do:

 

Workflow:

atcodedog05_0-1622789020054.png

 

1. Using summarize tool i am taking Min of check. Min goes ascending hence false is smaller than true. And if the column has false it will take false.

2. Using append tool joining back the [Min_Check] column to data.

3. Configuring message to check id [Min_Check]=="false". If yes its false throw and error and stop passing records. You can set an error message which is displayed when this error occurs.

 

Case 1: False is present

Case 2: False is not present

 

Hope this helps 🙂

AngelosPachis
16 - Nebula

Hi @videet ,

 

You can do that with a message tool that you can configure so it gives you an error before the first record with False is found

 

Screenshot 2021-06-04 075244.jpg

 

Then from the configuration pane, under the Runtime tab you can set your workflow to stop running if an error is found.

 

AngelosPachis_0-1622789258339.png

 

Hope that helps,

 

Angelos

 

atcodedog05
22 - Nova
22 - Nova

Great suggestion @AngelosPachis i didnt know we had this option in runtime to "cancel running workflow on errors".

 

Thank you for teaching something new 🙂 @AngelosPachis 

 

 

videet
8 - Asteroid

@AngelosPachis @atcodedog05 ,

If  I want to check 2 columns for false value do i nee to use 2 message tools?

atcodedog05
22 - Nova
22 - Nova

Hi @videet 

 

Either you can have 2 blocks for 2 columns check. Or we can check both condition in the same message tool like below.

 

Use And if both should not be false Use Or if either should be true

 

Workflow:

atcodedog05_0-1622791268118.png

 

Hope this helps 🙂

 

Labels