Display all distinct items + last entry/instance of a duplicate entry in repeating group

The app I’m trying to build is a document tracking system wherein I need to log all the modifications of a document. In order to that, the system creates new entries using the same document number so it will eventually have duplicate entries in the database. In a general view/table I’m trying to make, I need to list all the distinct documents and also the last entry/instance of a document with a duplicate entry. (Like threaded view in messages wherein you see the preview of the last message received or sent)

Number | Time | Subject | Status
12345 | 1:00 p.m. | ABCDE | Forwarded < should be retained since it's last entry
12345 | 12:58 p.m. | ABCDE | Received < should be removed
88888 | 11:00 a.m. | EEEEE | Received < shown since its unique
55555 | 11:00 a.m. | FFFFF | Received < shown since its unique

This topic was automatically closed after 70 days. New replies are no longer allowed.