How to accumulate multiple Reference Selector and Multi-Select Combobox values into a DataGrid before final commit

0
Hello!   I’m developing a web app in Mendix to manage requests. On my main request page, I have a DataGrid2 (let’s call it Grid1) that shows all requests. Grid1 is connected to a persistable entity called Require, which stores every request. When I click New in Grid1, a form popup opens. The form layout looks like this: Left side: 3 Reference Selectors 1 Combobox (with multi-selection enabled) An “Add” button Right side: A DataGrid2 (let’s call it Grid2) A “Submit” button Desired behavior: When I press “Add”, I want to take the current values of the 3 Reference Selectors and each selected value of the Combobox, and accumulate them into Grid2. Grid2 should act as a temporary list that collects all these combinations as I continue pressing Add. Finally, when I press “Submit”, I want to: Commit all collected records to the Require entity Trigger sending an email with the submitted information Question:What is the best practice or recommended approach in Mendix to achieve this pattern? Specifically: How should I design the associations between Require, the temporary objects for Grid2, and the multi-select Combobox values? What is the right way to implement the Add → accumulate → Submit → commit process in a popup form? Any advice, best practices, or examples would be very helpful. Thank you!
asked
1 answers
1

Use a non-persistent entity for Grid2.

On Add, create temp objects linked to the request.

On Submit, loop over those temps, create/commit Require records, then send the email.

This way Grid2 shows live data without committing until final submit.

answered