Missing field in the excel column

Yah that’s absolutely possible
Like in the same sequence mention above inside the IF condition, instead of SEND OUTLOOK MAIL ACTIVITY and BREAK activity use THROW activity
where create a business exception like this
New BusinessRuleException(“CUSTNAME column has a null valuee”)
so this will take use to CATCH block where we can have our SEND OUTLOOK MAIL ACTIVITY

this would work for sure
Cheers @balkishan

1 Like

Even Throw Activity show an error.

Sorry buddy I didn’t get that
What was the error we get from that activity
Syntax or compilation error
Cheers @balkishan

compilation error only.

@lakshman

1 Like

Fine
may i know what was mentioned inthe THROW activity
Cheers @balkishan

1 Like

image

1 Like

Fine
kindly try like this
new UiPath.Core.BusinessRuleException(“yourmessage”)

Cheers @balkishan

1 Like

same error throwing bro…

1 Like

ah
this is strange…
fine
try with New System.Exception(“your message”)
@balkishan

1 Like

Same bro.

1 Like

no way buddy
i tried to reproduce this issue it was working perfectly fine
here you go
catch.zip (17.4 KB)

Cheers @balkishan

1 Like

But don’t understand why this activity throwing this error.

hmm…yah
is the one attached working
@balkishan

1 Like

I am running your workflow and run this step by step bro. So If you check I gave the breakpoint at Throw Activity. But it show me the same exception. Why it’s showing me this error when I run from my end.

same error throwing me bro. just for the test purpose I am running your workflow only.

1 Like

Hmm
Ok what is the version of your uipath.core.activities
if possible kindly share your xaml and the excel file
let me test it once

Cheers @balkishan

1 Like

I am sharing your workflow and mine also bro. MissingColumns.zip (28.9 KB)

Couldn’t find the UiPath.Core.Activities Package

1 Like

i saw your excel
but i wasnt able to see your xaml, due to project version issue
fine
i think like we should not use TRY CATCH here
because our scenario is to send mail only when a row value of the column CustName is null, which can be at any rows right
–so we need to use without TRY CATCH BLOCK because if we use we wont be able to iterate through other rows like if the first row has no value in it, then it will come out to CATCH BLOCK where we will be sending the mail,
but if we want to iterate through next row we wont be able iterate through the next row in the datatable as we are in catch block.

so we need to use this without TRY CATCH block if we want to validate for all the rows and send mail for each one of them
and that can be done with these steps

but if we find like atleast if one row has any null value then we can use TRY CATCH block and that can be done with the process that we have now. But i wonder why its not working, as i can see working fine with my edition of studio 2018.3

kindly attach the project folder once again with your main.xaml and project.json file alone zipped together

@balkishan

1 Like

MissingColumns.zip (70.2 KB)