Report definition remove duplicate rows with condition

Hi,

I have a db table which having details as follows.

Batch Id status

1 Running

1 Finished

2 Running

3 New

4 Finished

Report definition result should be:

Batch Id Status

1 Running

2 Running

3 New

4 Finished

We are using this RD result as a source in UI table grid.

Remove duplicate rows option checked, it is not helpful. Basically if batch Id is single record then show same status and if batch Id has 2 rows one with running and one with finished then we should show only one row with running status. Thanks in advance.

@Umamageswari G

This is possible through the data Page response data transform- source the report definition in the Data Page and this can be handled in your response Data transform to filter the records based on your business use case.

thanks,

Ramesh

@RameshSangili Thank you for the response. In Response DT how to filter the records without looping each records to check the condition. In my example If same batch id having 2 records then show batch id with Running status. How to achieve this ?

Thanks in advance.

@Umamageswari G

Call function @Utilities.pyRemoveDuplicatesFromPagelist(PageName,“listname”,“propertyName”) to remove duplicate in a pagelist, but in your case first sort the pagelist in descending order on Status and then call the function. so, sorting will bring the top records with Status Running and bottom records status Finished, upon calling the function on Batch ID will remove records with Status finished.

@Kishore Kumar Madduri Thank You.

We used same logic and implemented already. It works.