Break activity inside Loop

Hi all,

I am using a for loop activity for reading all files inside a directory.
after reading i am checking whether the data contains a particular word using contains action inside a if condition.
if it is not present i want to stop performing the remaining actions for that particular file only and all other files need to be processed.

i tried to use the Break activity but it fails and it stops the entire loop.

How can i get it right…??

Works as intended.
Break breaks out of the loop.
Continue moves to next iteration - https://activities.uipath.com/docs/continue

2 Likes

Hi @jishnupnair1996, the break activity only works inside a for each loop.

try to print the value before you go for the if condition

Put some checkpoints like -
1.Print file name before if condition
2. Debug the process by putting breakpoints

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