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
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
Cool, thanks.
Any way to limit the results collection to one record?
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
Yes, I am using CMIS API.
Thanks for the hint.
Krzysztof
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.