Nested List Pass by Reference Issue

Nested List Pass by Reference Issue

  

Hi,

I have a nested List (3 level)

While filling nested from database i am using a local list variable.

In for each, I am clearing the Local List and appending to parent list.

But here list object works like pass by reference

Last local list value got updated in all the records in parent

How to fix this?




Hi Sekar,

Could you please share your code, want to look how you are storing data into parent list. It will give more clarity on problem you are facing.


Thanks,

Sachin





 

Solution

Hi Sekar,

You can use ListDuplicate action from System which will get you a new list.

Cheers,

José

Solution

José Costa wrote:

Hi Sekar,

You can use ListDuplicate action from System which will get you a new list.

Cheers,

José

Yes, I agree with you. perhaps the better way to do it.


José Costa wrote:

Hi Sekar,

You can use ListDuplicate action from System which will get you a new list.

Cheers,

José

Hi Jose,

Thanks for the reply, its working fine.