how to clear List.Current

how to clear List.Current

  

HI everyone, 


i have a list that i pass to a function and every time i want to loop through a list i will loose the 1st element list[0], reason being the List.Current record contains last element in the list.


is there a way to clear the List.Current and restart the for each loop, i tried setting the start index of the for each loop to 0, but it does not work.


could someone please provide me an alternative or solution?


Thanks,


Best Regards,

Hitesh


Hi Hitesh Vasnani, by using assign, You can clear the current record before every iteration,

 for example list.current.record.columnname=""......

or Create a record of same structure  type and before every iteration you can assing the list.current=RecduplicateCurrent



Thanks 

Rajendra Singh

Hi Hitesh,

Please provide more explanation.

Suraj Borade wrote:

Hi Hitesh,

Please provide more explanation.

Hi Suraj, 

the insert method that i created takes in a nested list. and i need to loop through the list to create records.

now when the list 1st starts to loop in the 1st for each loop ExceContentStructList.Current is defaulted to the last element in the list and does not start from element [0]