How to Filter Records in a Data Grid Based on Field Values with Microflow Data Source

0
Hi all, I’m using a microflow as the data source for a data grid, which retrieves around 10,000 records from an external database. Each record has multiple fields, but I want to filter the records shown to each user based on the value of one specific field. Some users should only see records if that field contains certain values, while others may see different sets of values — depending on their role. Example: Let's say user A sees records with field value 'X', user B sees records with field value 'Y', while user C sees records with field values 'X' or Y' Also, I’m working with non-persistent entities in this case. What’s the best way to implement this?
asked
2 answers
0

Hi Lasya Priya Yelishetti

You have to make custom filter for this & set the visibility on the user input filter fields.

Check out the below article

https://medium.com/@mohammad.saqib_1262/part-1-unlocking-the-power-of-custom-filters-for-data-management-cd4f62b2e209

answered
0

Hi Lasya Priya,

 

Use OQL in the microflow to get the data and there you can write query to be shown as per field value. This will do 2 things:

1. You can get the result as per your requirement

2. Adding server-side pagination with OQL will optimize the microflow for data retrieval. And yes, you have to use non-persistable entity for this as a best practice

 

With around 10K records, your client-side is going to be choked if not optimized now!

 

Thanks

answered