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
0
garym
over 7 years ago
...rned. I have provided the expression rule screenshot.
Any help would be much appreciated?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Poorna Guduri
A Score Level 1
over 7 years ago
Hi gary, just a quick one - do you need a recursive search for the documents? If not, you can make use of the folder() function to fetch the documents inside the folder. Now, the folder() function has 2 new properties - documentChildren, folderChildren - with 16.x version.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
garym
over 7 years ago
Hi Poornah, thanks for responding. I did try setting the recursiveSearch to false() and I still don't get the list of documents that I am expecting.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Poorna Guduri
A Score Level 1
over 7 years ago
I am not sure why is it causing an issue but what my suggestion is to make use of folder() function if at all you do not need a recursive search for the documents inside the target folder. Ex: folder(pv!targetFodlerId,"documentChildren")
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Ram
Certified Lead Developer
over 7 years ago
Hi Gary,
The Custom Content Functions jar might be corrupted try to download the jar from forum and import it again.
For your reference i am proving the link to the Custom Content Functions shared component.
forum.appian.com/.../summary
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Poorna Guduri
A Score Level 1
over 7 years ago
@gary, Give it a try as Ramesh suggested. But if it does not solve your problem, you may need to look into the logs to find if the log says something about the execution of this function.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
garym
over 7 years ago
Thanks. I did try another using the expression rule on another folder with documents and it actually returned a list of documents. There must be something about this specific folder that it does not like.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
garym
over 7 years ago
This might have something to do with it. If I try to click on any of the documents in the folder, I get an message saying "This document is pending approval".
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Poorna Guduri
A Score Level 1
over 7 years ago
Ah.. that make sense. The document(s) is/are not readily available to make use of. But I am curious to know why this pending approval is coming?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Ram
Certified Lead Developer
over 7 years ago
Hi Gary,
I think this forum post might help you on this.
forum.appian.com/.../e-220820
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>