Facing issue in the looping part

Hi, I am facing a serious issue.
Suppose I have 5 records in the loop. So I put this in a TRY Catch okay.

So now what I am facing if loop iterates the first records, again it will fetch and process the second records if there is an error in the 2nd records. so it directly executes the Catch block and stops the process. But I want to bot iterate all 5 records. like if there is an error in the 2nd records, it should skip the 2nd and process the 3rd right. Please suggest. @Palaniyappan @lakshman

Note - this case is related to database.


Put IF condition and check the logic in else place continue activity

1 Like

sorry didn’t understand bro, can you explain more. In try block I have only Loop part. nothing else.

can you attach your xaml file, so that i get good idea


1 Like

You were almost done buddy
In that case we should not keep the whole FOR EACH loop inside the TRY CATCH BLOCK
Instead the do part or the sequence inside of FOR EACH must be kept inside the the TRY BLOCK, so that the loop will go on to the next record

The sequence should be like this

For each loop activity starts
Try block of TRY CATCH Activity
Sequence of activities to be done inside the loop
Catch block TRY CATCH Activity
For each loop ends

Cheers @balkishan