Hi, Is there any way where in I can get the latest document stored in our c

Hi,
Is there any way where in I can get the latest document stored in our community in our process variable in process? By latest, I mean the document which is stored latest in a particular folder in community?
For example, if there are 10 files stored in a particular folder in community, among which I want to get the last document which get saved in this folder in my process variable in process.

Thanks in advance....

OriginalPostID-76648

OriginalPostID-76648

  Discussion posts and replies are publicly visible

Parents
  • Hi Siddarth,
    You can achieve this by using below expressions to get the latest document from a particular folder:
    getdocumentsfromfolder(pv!folder,"created")
    -which returns the document array--pv!documents
    pv!documents[length(pv!documents)]
    -from this will get the latest document

    But there is one limitation,if the document versions are changed then this will not work.This works only for single version of the document
Reply
  • Hi Siddarth,
    You can achieve this by using below expressions to get the latest document from a particular folder:
    getdocumentsfromfolder(pv!folder,"created")
    -which returns the document array--pv!documents
    pv!documents[length(pv!documents)]
    -from this will get the latest document

    But there is one limitation,if the document versions are changed then this will not work.This works only for single version of the document
Children
No Data