Adding a list to an object

0
I've created a shopping cart where products can be placed in. Inside the shoppingcart there is one button to add all of the products inside an order. When the "Bestellen" button is clicked the following microflow will be called: The new object "bestelling" is created but the products are not placed in the bestel_lines table. Inside the loop this is filled in the bestel_lines table: I can't seem to figure out why the products are not placed in the bestel_lines table. Thanks in advance for helping me out.
asked
4 answers
1

Hi Boris,

 

Can you show is the relation between the bestelling and bestelling_heeft_producten entity?

 

For performance: What you need to do is create a list before the loop, then create an object inside the loop without committing, but add the new created object to the list. After the loop commit the list.

 

Good luck.

answered
1

What is the input parameter of the microflow?

As I can deduct of the screenshot, you create a list of "winkelmand". By definition this will be a empty list. So iterating over this empty list, will result in nothing. As far as I can deduct from your case and model; the microflow should start with a input parameter list of "Winkelmand" where all objects of the grid will be passed into the microflow.

answered
1

I figured it out. The following microflow did it for me:

Thank for helping me out. I did not notice that the list was empty when created and had to be filled manually. 

answered
0

Hi Jeffrey,

This is our current domain model;

We are currently working on a school project, where you can add products as a seller and buy them as a buyer. 

answered