Can we use variable for the range in For Each loop?

Can we use variable for the range in for loop ?
image
I tried the above as per above image but it still takes all the pages

Variables are not currently accepted as filters. You can vote for this topic if you’d like it implemented.

In the meantime, you can use a small custom action to create a new list using the range you need and then itarate throught it.

@CustomScriptAction(
    input = ['original_list', 'range_start', 'range_end'],
    output = 'my_list'
)
 
def customScript() {
    my_list = original_list.getAt(range_start..range_end)
}

1 Like

Sure, It would be good to cover this issue in next release as it will help to create a robot more dynamic. Thank you.

1 Like