How to create a loop, and then break out of a loop if a condition is met

Hi there. I have a requirement to create a test, where I have to click on a name present in a table, if the name has more than 0 recordings (visible in another column of the same table).

I though of creating steps that will get number of recordings, perform the click action if recordings are greater than 0, and if recordings are equal to 0, it should decrement, and get the text again, and perform the same steps. But once the condition is met, it should break out of the loop and continue the next steps.

I am having trouble with breaking out of loop once the condition is met. Can anyone please help me with this.

Hi @hgoyal,
This article should help you do that: