Pass whole list with filters of DataGrid2 to Microflow

0
Hi everyone,   Is there a way to transfer the complete list that has been filtered by some field in dataGrid2 to a microflow?        With the multi selection option and selecting all, it only transfers to the microflow the paginated elements that are currently configured at 100 (page size) instead of the 967 elements that have remained after the filter applied. Paging is necessary to maintain since we work with data of up to 100k.        
asked
2 answers
0

Sadly not. You must build some logic around that to do so or tweak the code of the widget itself.

How you can implement the required functionality using the OOTB solution:

 

  1. Create a helper entity and add all attributes to the entity you want to be able to search for.
  2. On the page add a data view where you create the helper entity and place the data grid 2 into that data view.
  3. In the datagrid add the filters you require navigate to General > General and define a default filter and set "adjustable by user" to false. In General > Configurations select the attribute of the helper entity to store the filter value
  4. Add a button at the top (Select all) and call a nanoflow (or microflow) and hand over the helper entity as parameter.
  5. In the nanoflow do an XPath retrieve and apply the filters that are stored in the helper entity.
  6. You can now use all objects that match the filter criteria.

 

This approach does not select the elements using the data grid 2 select. If you want to display selected elements you also have to build that by hand:

 

  1. Add a 1 to * reference to the helper entity which points to the helper entity
  2. In the first row of the DataGrid add a checkbox-checked and checkbox-unchecked and apply conditional visibility depending on the state of the reference empty or not empty.
  3. Add nanoflows for the On Click Event of the checkboxes and add/remove the association depending of the selection state

 

Important comments:

  • All these activities must be performed on client side and should not be refreshed so that the user specific states are not displayed to other users.
  • I would only add the second part if the total number of objects is <3000 as else you could run into memory issues
  • If you want to interact with >3000 objects directly perform the action on the select all button and apply batching
answered
0

Hi Jorge,

You have to make your own custom filter then you are able to send filter list in microflow.

Try below link

https://medium.com/mendix/create-your-own-way-of-filter-by-npe-non-persistant-entity-and-microflow-4ffd11e52fb0

 

answered