Document in Folder

Certified Associate Developer

Hi All

Newbie to Appian.

Trying to find, by date & time, the latest (most recently uploaded) document in a folder; this is as far as I have got in an expression I am playing around with:

a!forEach(

  items: folder(1234, "documentChildren"),

  expression: document(fv!item, "dateCreated")

)

Any good examples to help me finish this off, or can anyone suggest how to loop through each document and return the newest?

Example Algorithm in pseudo code I would like translated to Appianese.

MostRecentlyUploaded = initial ‘zero date’

For Each Documents Creation Date

              If Documents Creation Date > MostRecentlyUploaded Then

                             MostRecentlyUploaded = Documents Creation Date

              End if

End For

Return MostRecentlyUploaded /* The most recent date */

Thanks

 Daniel

  Discussion posts and replies are publicly visible

Parents Reply
  • Certainly, I'm also uncertain, and I attempted to implement binary search in Appian using a recursive approach. Surprisingly, this consistently takes more time than a straightforward linear search. I'm puzzled by this because, as we understand, binary search typically has a time complexity of log(n), while linear search has a time complexity of O(n). Could it be attributed to calling an expression rule or passing substantial data through RI(s) multiple times?

    and yes I'm gonna read that. Your blogs, as well as Harshit's blogs, are rich in information and contain sharp details.

Children
No Data