Do something every 10th loop

I have a code that is repeating infinite with the " Repeat number of Times" function.

The loop number is stored in CurrentItem. I want to do a part of my code only every 10 loops.

I tried setting Currentitem back to 0 after every 10 loops but that didnt work, should this be possible?

In other programming languages I think we can use something like:

for(int i=0; i < 9999; ++i)
{
    if(i % 10 == 0)
    {
         //my actions on i = 0, 10, 20, 30 ...
    }
}

But I couldnt figure this out in studioX in the " IF " statement.

Thank you for your help!

Hi,

Cab you try as the following?

Choose “Open in Advanced Editor”

Then input CurrentItem mod 10 = 0
image

Regards,

Thanks a lot, that worked great!

1 Like

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