For Each Break issues

Going through the docs for learning, and I’m in the Break activity

I followed the instructions (didn’t work). Then compared the dowloadable version to mine which I think is the same (obviously not as it doesn’t work)

ForEachBreak.xaml (6.5 KB)

When I add the ‘Break’ activity to the body of the For each loop I get a warning '‘activity can only be placed inside a ForEach loop’ … but it is, isn’t it???

As far as I can see it’s exactly the same as the downloadable version except mine has the colourful blue exclamation marks and won’t run :exclamation: (obviously I’m missing something but can’t see what the problem is,sorry folks)

Thanking anyone who takes pity on me in advance.

All the best,

Hi.

I’ve seen this before. There are 2 generic For each activities and the Break activity works in only one of them. So, if you use the other For each, it should work.

2 Likes

ClaytonM. You are an amazing genius!

Of course there should be 2 different for each loops one which works with break and another sneaky one that cunningly doesn’t (for mysterious reasons, but both named exactly the same so you can’t tell which is which).

Thank you for putting me out of my misery while there is still some hair that I haven’t pulled out.

All the best,

No problem, lol.

Also, you can see the which is which by looking in the Properties cause one will say “UiPath.Framework” and the other will say “UiPath.Core”.

Regards.

1 Like

Looks like I’m using the Framework one (that doesn’t work) thanks for the amazingly intricate level of knowledge

One of the for each activities is UiPath.Core and the other is UiPath.Framework. I’m not certain which of the two works in your workflow but does anyone know if there is an actual difference (by design) in these two activities? I mean there is obviously different behavior between the two but should they be used for different situations? Should one be removed?

1 Like