Multiple Loop and AppendToDocumentList

Hi All,

I am trying to append data with AppendToDocumentList in multiple Loop. So while appending existing data disappeared automatically and only appended document available. Could you please help me on this. Thanks in advance.

1–LOOP
2–Loop
3–Loop
------appendToDocumentList
Regards
Hariom

Hi Hariom,

can you provide some more details please?

Some Screenshots might be helpful as well.

Regards,
Holger

Hi Hariom,

Besides what Holger said please be aware that those imbricated loops, along with the usage of the appendToDocumentList service might cause performance problems if you have a large number of records.

I would recommend redesigning your approach (if it is something productive and not a POC) and doing some load tests to be on the safe side.

Best regards,
Vlad Turian

Without knowing the detailed code:
A typical issue if appending documents to a list is if you not not drop the single added source documents between the appends. If you don’t drop those instances you just get multiple pointers in the list to the same object. So make sure to really drop the source document after the append.