How to assign value as exception.message in catch and write the exception inside finally

Kindly help on the above statement…

Let me know how should I assign value to finally block so that its should loop if an error occur and that exception message should write on excel sheet.as failure
Sample_run.xaml (27.1 KB)

As per my understanding, you need to use retry scope so that it will retry the activity again if the activity fails. @ShreyaSharma

Inside that, use try catch first and then all the activities inside, so that if it fails, catch the exception in catch block and then write the exception to excel in finally

@HareeshMR can you show me how to write the exception portion in finally block …I am really not sure how to do it

Appreciate if you could send a screenshot or a xaml

@ShreyaSharma

This is the catch block where we are assigning the message to a variable

image

And this is finally where we are writing the value to excel

image

1 Like

Sample_try.xaml (23.8 KB)

Not working…its not moving the next row and moreover not updating the Status column as well

Are you getting any error @ShreyaSharma?

@HareeshMR

I am not getting any error nor its updating status on the sheet…
its just running for first row item

You gave the range as “A1”, so it is writing in the first row only

Make it dynamic to write it in the next row as

  1. Declare the variable as count of type “integer” in the main workflow
  2. Assign the range as “A” + count.tostring
  3. after writing one value increment the value as count = count + 1

Did you mean AG is the row you want to write the status @ShreyaSharma?

@HareeshMR Yes…correct

But its updating any status on AG column

You have to surround the AG in double quotes as

“AG” + …

@HareeshMR

I did but the loop is not working…In case an selector error comes its stop…ideally it should move to next row item but its not working…Kindly help.
image

As per the screenshot, for each row is executed again @ShreyaSharma

Sample_run.zip (10.5 KB)

@ShreyaSharma, please try to use this workflow. I have modified your .xaml by adding For each Row loop only.