12-14-2017 12:07 PM
Hello All
I have a similar document type stored in couple of folders. I would like select the most recent one using CMIS queries.
Is there a way to accomplish that?
Thanks
Krzysztof
12-15-2017 04:08 AM
Just sort your query based on cmis:lastModificationDate in descending order and select the first...
i.e.: SELECT * from cmis:document D WHERE (IN_FOLDER(D, 'folderId1') OR IN_FOLDER(D, 'folderId2') ....) ORDER BY D.cmis:lastModificationDate DESC
12-15-2017 12:34 PM
Cool, thanks.
Any way to limit the results collection to one record?
01-05-2018 06:14 AM
Hi
You should be able to use paging and limits on the request. The CMIS browser binding uses the maxItems and skipCount parameters. I have assumed you are using the CMIS API as you do not say .....
Andy
01-05-2018 08:40 AM
Yes, I am using CMIS API.
Thanks for the hint.
Krzysztof
Explore our Alfresco products with the links below. Use labels to filter content by product module.