Printing Selected Rows from a ListView

Hello everyone, I’m trying to print selected rows from a data grid by first opening the data in a list view and from there selecting check boxes from the rows which i need.  The document template does indeed print with no data from the said data grid and at the Modeler console an error is produced … “This Mendix version is not compatible with list view controls. The List view controls use is limited.”  If there a way around this? I’ve been searching and trying different approaches for a long time with no success. Thank you   EDIT Here is the senario… a client who has had work done in the past ...comes in for more work and would like an estimate.  I want to print the treatment which is pending (without a date). The button “Select Treatment Plan” brings me to a popup page with a listview where I’m able to choose the treatments I want. (changing the boolean to true) Yet the page which I’m constantly printing is either all the treatment or nothing at all. I’m not able to only print the ones I need. Underneath is the print MF and at the Create activity I’ve added an Edit Change Item –> Member: select (Boolean) – Type: Set – Value: true     I hope this helps!
3 answers


maybe there is a solution without the listview controls that seem to cause some issues. You could create a wrapper object and create a onclick action on you listview that associates/unassociates the clicked element in the Listview with your wrapper. If you are done with selecting elements you could pass this wrapper object to your document template.


Can you give some more information? Where do you use the list view controls? What does the microflow with your document template action look like?

In general you have to pass or retrieve the selected rows in a microflow. Then in this microflow you pass this data to the document template. The setup of the document template defines what data needs to be the input.


Looking at your screenshots, what i think you should be doing is as follows:

One or more of the treatmenthistory objects are selected by the user. They are linked to the contacts object. In the template document you have problably placed a datagrid with the treatment history.  If you place this datagrid outside of a dataview in the template grid it becomes available als a list parameter.

What you then need to do is retrieve the treatmenthistory objects linked to the contacts that have the select boolean as true. You can either do this with a xpath retrieve(first commit the treamtent history) or with a list operation ‘Filter’. The filtered list can be set as a parameter for the documenttemplate and then you will have your result:)