Hi Judith,
I had a go at it and it works on mendix 8.18.1, see below page:
I will start with the domain model:
There are 3 entities: 2 Non Persistent which hold the 1-to-many relation (List and Item) and the persistent table that holds the converted data.
In the main page I start with teh creation of a list via de DS_NPListCreate:
The list is created and returned to the dataview. In the datagrid I list all the Items associated with this list, which at starting point is empty.
When adding the ACT_ListItemAdd is started, which has a parameter of the NPList Object.
I create an Item with an association to the parameter:
In the microflow an simple added page is shown, I didn’t want to make it to complicated ;-), also have not included any validations.
After adding the Item it will be shown on the screen.
There is also a process button that processes the full list into the persistent table:
If have made it the clean way by having a list of the persistent objects that I commit after the loop. I also remove the items form the non-persistent list so you are not going to process twice.
After processing the information will be visible in the persistent tab
I hope this will help you. If you send me an email (andre@mendixmagic.com) I can send the MPK file with all details.
I tried to do everything you said and it works BUT every time I create a non-persistent object on the form the list updates and only shows the last one created. I think this is due to the microflow, where every time the user saves a non-persistent object they create a new list.
Here is my microflow:
The first action creates a list of the non-persistent entity, the second adds the non-persistent object to the list.
Could you give me an idea how to add each of the non-persistent objects to the list?
-Thanks for your help so far-
Yes, that is possible for example by using a microflow as datasource that delivers a list of the non-persistent objects.
Question is how you create the list with non-persistent objects. Please provide more details if more assistence is needed.