Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
20 replies
Subscribers
8 subscribers
Views
5690 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
issue with getdocumentsfromfolder function
garym
over 7 years ago
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
0
sikhivahans
over 7 years ago
@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.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
sikhivahans
over 7 years ago
@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.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data