Continue activity error-'activity can only be place inside a loop'

Hi guys, Please assist here. I am checking if an element exist then after I have my if condition to say it it’s true that it exists then skip and start again to search


There is no need to put continue.

If your element exists

1 Like

Hi @Anelisa_Bolosha1


1 Like

Hi @Anelisa_Bolosha1

Continue Activity is use under any Loop like For Each, While or Do While.

Instead of Continue, you can use IF Activity to check the condition.

Hope it will helps you to understand :slight_smile:

1 Like

Hi @Anelisa_Bolosha1

Continue activity has to be use inside the loop only, Are you using any loop for iteration, and you are checking the element exist inside loop,
→ If yes, then in then block in If condition place the Break activity to break the loop if element exist.
→ If not just ignore the else block. it will go for next iteration no need to use continue activity.

Hope it helps!!

1 Like

Hi @Anelisa_Bolosha1 ,

You can use the do while loop to retry the process until your element appears.

Vinit Mhatre

1 Like

we recommend to workout the goal on what is to achieve (feel free to share it with us) and then check the different modelling options

  • Loops
  • retry scope
  • Split xamls

The validations message is in relation where this activity can be used as also said by others above

But lets keep in mind:

introduced / announced: UiPath Community 2023.10 Release - Studio & StudioX

1 Like

Hi @mkankatala , it’s not in a loop just an if condition

If it it does exist, it’s just going to write in an excel file if it doesn’t then do another thing

Okay @Anelisa_Bolosha1

Then the Continue will not work here.

If element exist then the bot will go to then block, insert excel activities in it.
If element doesn’t exist then the bot will go to else block, insert other activities to move forward.

You have done the correct thing I think… @Anelisa_Bolosha1

Is there any other condition if the element doesn’t exist.

1 Like

Alright, thank you so much guys…no other condition

It’s my pleasure… @Anelisa_Bolosha1

Happy Automation!!

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