issue with getdocumentsfromfolder function

Hi,
The getdocumentsfromfolder function seems straightforward but for some reason, it is not returning any documents when being used in one of our processes.
I have a sub-process which is being passed the folder in a pv called pv!requestFolder. I can see this folder in our documents tab and there are documents in it. This folder is called "SC-2016-00177". The sub-process calls the getdocumentsfromfolder function and saves the output into a pv of type documents (multiple).

getdocumentsfromfolder(
rootFolder : pv!requestFolder ,
recursiveSearch : true()
)

In the process, I can see that the value of the folder has been passed properly to a pv of type folder and the value is SC-2016-00177.
However, when the expression runs, it doesn't return the list of documents.
The security on the folder is correct.
Even when I try to run this in an expression rule, I can't get the list of documents to be retu...

OriginalPostID-251463



  Discussion posts and replies are publicly visible

Parents
  • @poornah It may seem to you that it's working but it won't work as intended provided if you perform some more testing(just reverse the order of arguments and see what happens). Please find attached the picture and you can understand the difference. In the first example, though you pass the values by keyword, the function still takes first argument as folderId(casting the value of false to 0) and retrieving all the documents that are in the folder that has 0 as id. You won't observe this kind of behavior with system functions or expression rules.

    At a high level it appears that we are making use of 'by keyword' approach, but behind the scenes it's actually making use of 'by position' approach.
Reply
  • @poornah It may seem to you that it's working but it won't work as intended provided if you perform some more testing(just reverse the order of arguments and see what happens). Please find attached the picture and you can understand the difference. In the first example, though you pass the values by keyword, the function still takes first argument as folderId(casting the value of false to 0) and retrieving all the documents that are in the folder that has 0 as id. You won't observe this kind of behavior with system functions or expression rules.

    At a high level it appears that we are making use of 'by keyword' approach, but behind the scenes it's actually making use of 'by position' approach.
Children
No Data