Question Corentin Blondeau · Oct 2, 2023

How to merge lists in Business Process

Hello,

I have a method in an operation wich return a list of %String (listId).
I call it multiple time in a Business Process and want to have all the lists I get put into one.
Not having "set context.listIdProcess = callresponse.listId" , but a way to add the elements of listId in context.listIdProcess.

There is an other way than append each element of the list?


Thanks for yours answers,
Corentin

Product version: Ensemble 2018.1
$ZV: Cache for Windows (x86-64) 2018.1.4 (Build 505_1U) Thu May 28 2020 10:01:40 EDT

Comments

Corentin Blondeau  Oct 4, 2023 to Luis Angel Pérez Ramos

I obtain this error : Erreur Cache: <LIST>zInsertList+5^%Collection.ListOfDT.1 when I call the InsertList method :

do context.listIdProcess.InsertList(callresponse.listId)

Thanks for your answer

0
Luis Angel Pérez Ramos  Oct 4, 2023 to Corentin Blondeau

Try with the following code:

do context.listIdProcess.InsertList(callresponse.listId.Serialize())
0
Corentin Blondeau  Oct 4, 2023 to Luis Angel Pérez Ramos

It works !!!
Thanks you
Furthermore, listIdProcess doesn't need to be initialized

0