For each row round2 not working

Hello I havee flow as below.

For each row
Round1 work complete
Round2 It go to condition if and go to finally block not go to for each row

Please guide me for solve it.
Thank you

@Stef_99

run in debug mode and check what error you are getting

looks like the if condition is failing

cheers

Hi,

If CurrentRow(“ACCOUNT_ID”) is null, the above expression throws exception.
So, for now, can you try the following expression?

CurrentRow("ACCOUNT_ID") isnot Nothing AndAlso (Not String.IsNullOrEmpty(CurrentRow("ACCOUNT_ID").ToString.Trim) AndAlso .....

Regards,

Hey @Stef_99 can you Try to run your project in debug mode and add a breakpoint in if condition.so that way you get the idea where goes the condition get false.and also the the reason why your loop got fails.

cheers

I use debug and use step into

for each row first complete
on the way to second row
after step body → click step into ----> It go to finally block not go to activity for each row

Please guide me for solve it.
Thank you

ok @Stef_99 so you are surround it with Try Catch in the Catch Section use Log Message and in the log simply write Exception.message that way you get the Exception.which occur and as per @Yoichi Said your If condition if it found num in that Column it throw Error so first simply find the Exception and try to change the logic.so you get better understanding on that.

cheers

Hello
Wrap the loop in a Try-Catch to avoid stopping on errors.
Check if “Break” or “Continue” is causing early exits.
Verify the DataTable has multiple rows.
Ensure the If condition is correct and doesn’t skip unintentionally.

1 Like

I try delete condion in try block
but it not go to row2

remark : debug row count = 7

Please guide me about it.

@Stef_99,

It’s happening due to some exception in second iteration. Log the exception in Catch section and share the error message to help you better on this.

Can you Show the Input File and please Make your Code As it is. just in the Catch Section Log that Exception use Log message and Pass Exception.Message so we get the better idea .

cheers

@singh_sumit @ashokkarale I add continue it work.

Thank you

1 Like


Might be you excel is look a like this where 2 row is empty and you give the logic


and in the else i think you are passing break activity . so when it goes for the 2 row where data is empty it goes in the else branch and break that loop.so if you are using loop remove that.

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