Skip to main content
September 29, 2021
Solved

Cycle a list to insert in a database table.

  • September 29, 2021
  • 2 replies
  • 0 views

Hello,

I want to insert a list of a CDT to the database. In an Interface, I create that list, and after, I want to insert multiple rows to the database (one for each item of list).
How can I accomplish that?
That interface is connected with a Process Model.
With a forEach in the Interface, I can only insert 1 value, I think.
It is possible to do a cycle to iterate the list in the Process Model?


Thanks, David

Best answer by stefanhelzle0001

A writeToDatastoreEntity node in your process model will happily store a list to DB. Just make sure to make the process variable a multiple aka array.

2 replies

stefanhelzle0001
Brainy
September 29, 2021

A writeToDatastoreEntity node in your process model will happily store a list to DB. Just make sure to make the process variable a multiple aka array.

September 29, 2021

That worked! Thanks! [emoticon:6d505171faa4497c85c5ca27290c555d]