Get the highest ID of the data type records in RD

Hi everyone,

I would like to get the highest ID of the data type records .

When I used the max in the summarize report definition to get the highest ID of the data type records, it not got the highest id correct ..

I have id from A1 to A18 , when i use the max in the summarize i got A9 .

Please, how can I get the highest ID like A18 ?

Thanks in advance.

@ThekraA6

You can write a DT to sort the data records page list with ID in descending order and get the ID from the first record.

@P.Siva.Praveen

Okay thank you, but how can i get the ID from the first record ?

@ThekraA6

  1. Write a datapage which sources the report definition of the data type records.

  2. In the Data Transform define this datapage.

  3. Sort the report with the DataTransform sort method with ID (in Ascending order) or you can also handle this at the report definition as well with the sort on the ID column.

  4. D_datapage.pxResults(1).ID will fetch the ID.

@P.Siva.Praveen Thank you for your replies, this didn’t work properly but I solved it with another way

Sorting after first character | Support Center (pega.com)