Stoping the process after finding the duplicate

Hi, in the circle workflow I am checking the if the Excel contain the same column name then I just go to the Catch Block and sending a email. But If you see I have 2nd workflow which is Check Duplicate Rows. I don’t want to run this.

How can I stop the process once it execute the Catch block of CheckDupColumn workflow. which I circled.

Is Break Activity work here. I didn’t use the State Machne here. In the sequence I want to stop the process. Please help.


see here, I am using the TRY Catch here. I am checking whether the Excel containing duplicate or not, if not then execute the TRY Block and next execute the Wirte Right?

But when found duplicate both will Execute Try and Catch Block. So what I put in Catch Block so that my workflow is stopped there only not execute the Write Line.

@Palaniyappan @HareeshMR

Simple to understand solution @balkishan

There are lot of ways to do that, but this one will let you understand easily,

  1. Create a new variable in the main workflow which is of type boolean (FLAG) and assign the value as TRUE
  2. Once the duplicates are identified, assign the value as FALSE else just leave it
  3. For the workflow Check Duplicate rows, use a if condition and provide the condition as the variable you declared in the step 1
  4. If the value is true , it will execute the workflow, else it will stop that

Hope the steps are clear

1 Like

Bro, Please tell me in the case of when I use the TRY Catch Block. see I attached the screenshot.

OR you want me to put the entire workflow where I am checking the Duplicate Columns to put in a .IF condition

No need to use a try catch activity here @balkishan

Wherever you are checking the duplicate rows, just assign the value to the variable if you find values. Then after that activity, use IF condition , and inside the IF, place the second workflow, Thats it

1 Like

Bro then how will you check the duplicate in the excel, I am using TRY Catch for this, in the try block I have used the Excel Scope and Read Range, If there is a duplicate it will execute the Catch Block. and sending an email, here only I want to stop the process. I don’t want to execute the next workflow( Write Activity ). Attached the screenshot above

If you see now I have duplicate Columns in the excel, so my Catch block is executing and then Write Activity is also executing. So I don’t want to execute the Write activity once Catch is executed.

Got it, I hope you are looping through the columns and then identifying. But I missed that

Here is the workflow for reference

MoveFile(Autosaved).xaml (9.3 KB)

1 Like

Thanks Hareesh solved the issue.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.