34
Views
3
Comments
Solved
Remove record from  list inside loop
Question
Application Type
Reactive

Hi All,

I am using ListRemove inside loop and it is giving me error.

Error - Remove is not a valid operation inside a StartIteration/EndIteration block.

How can i fix this issue.

Thanks In Advance

Piya

Rank: #88
Solution


Hi,

You are trying remove record from a list and same list on loop.

it is not possible.

So do one thing-

1. Create a Copy of same list

2. Use loop on first list and remove record from Copy list.

3. Use copy list after loop end 

and you will get actual data.


Hope this will help you.


Regards

Rahul

Rank: #258

Hi,

Use local variable and ListRemove action.

Before using it, you need to iterate on your list, find out the row number of the item want to delete, and after the for each loop is complete you use the ListRemove using the row number as input parameter.



Rank: #5806

what if you have to delete multiple rows?