multi select in list view

0
Hi, I want to select a set of users from a group ("ploeg"). i have a set of groups and each group has a set of members. I want to apply a (dynamic) filter on the data and therefor I use a listview and added a dropdown filter. listview with (unused) dropdown filter:                with filter applied: first problem: in order to use the dropdown filter i added multiple groupnames based on attribute "ploegnaam". I have hardcoded all the present groupnames (this works) but i like this to be dymamic, based on the "groepnaam" value. is this possible? Listviews do not allow multiselect as in datagrids. but if i use a datagrid i cannot use the dropdown filter. has anyone any suggestions of how i can accomplish this?
asked
3 answers
4

As a listview does not have a multi select option you could set the listview to editable and add a select boolean as dropdown. This way you mark the records you want to use and can then perform an action on the marked records.

Be aware that this simple solution will not work when multiple users are selcting records from the list.

In that case you'll need a function to relate the selected objects to the user or session so that you can retrieve the records with your action based on the user.

In both cases the first action should be to reset the selection boolean after retrieving the list of records.

Not quite sure why a listview must be used, as the template grid seems to be a better choice in your case though.

answered
3

I think you could find a app in the app store for that problem:

https://appstore.home.mendix.com/link/app/105694/

Maybe this app could be something for you.

answered
1

Hey there! i encountered the same problem and i managed to create a workaround/hack for this to work. I added a test project to my github where multiselecting on the filtered set of records works. You can have a look at it if you want: https://github.com/reemster123/mendixListviewSelectAll.git

Short story of what i did: 

- Created a Javascript action which is triggered by a button. This JsAction finds all the filters and their input values and returns those as a list of objects in a nanoflow. With this list of objects i managed to create a generic xpath to retrieve all records for the entered filtervalues.

Hope it helps!

answered