Custom Search button for Data Grid 2

0
Hi Experts, I have added data grid 2 with Datasource as microflow and added logic for filtering the list in that microflow. In the microflow, I am retrieving all data from database. But due to heavy records, I am facing performance issue. Data is taking time to load (more than 14 seconds).   So, I have added search button and call that microflow on search button. But when I click on search button filter logic is not working and search is also not happening.   How do I map that search button to the data grid 2? Below is the screenshot of my DS microflow of data grid 2. I have attached in part-wise.   Page desing -
asked
2 answers
1

Hi Sweety,

To achieve this, you can refer to the blog, I wrote,

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

This way, you will be able to achieve your requirements.

Let me know, if you have any issues,

Hope it helps!

answered
0

Hi Sweety, you may need to create a helper entity for this. It would look something like this

1. Create a helper entity in your domain model with a 1-* association to your datagrid objects

2. On your page, you will wrap your data grid inside of a data view. The data view should display a Helper object, the datagrid nested inside will display the list of objects associated to the helper (datasource by association)

3. When the user clicks on search, you will call your DS microflow above to retrieve a list of data.

4. Associate that new list of search results to the helper object and refresh the helper in client

5. This will trigger the datagrid to update with the new list of filtered search results

 

image.png

 

answered