Pass two objects from two entities to a single form page.

0
I have two tables: Ticket and Comment. I am listing tickets on a page. The user can click on a ticket, a page with a Text area for comments, pop up, and users can add their comments. I want the ticket object to be passed to the Comment page. How can I do that? This is my domain model. This is the ticket list. When user clicks on one of them, a comment page like the below appears: After I click “Save”, the following comment list is displayed: I have declared an association between Ticket and Comments, but I’m not able to insert the Ticket_ID along with the comment.   Thanks.
asked
2 answers
0

You can use the listen to functionality. See documentation here: https://docs.mendix.com/refguide/listen-to-grid-source#1-introduction

The clicked ticket will be used as parameter for a dataview and you can then place the comments grid inside this dataview and retrieve over the association all comments on that ticket.

Regards,

Ronald

 

answered
0

You can pass through 1 object to a page in a data view. This will be the page parameter. In this case I guess that Ticket and Comment are associated with a 1-* or 1-1 association. If 1-*, you can put a list view in the data view of Ticket has context as data source. Then select the correct association. If the association is 1-1 the idea is the same, but use a data view and not list view

answered