I am writing an Appian web API, to retrieve documents from our Appian system which will be used to integrate with our other systems.
To this end, I am using the folder() method to get information about the contents of a folder in appian.
folder(
theCaseFolder,
"documentChildren"
)
The problem I am having is that while this code works most of the time - we have some cases where there are more than 1000 documents stored against the case. I note that the appian documentation at:
https://docs.appian.com/suite/help/18.4/fnc_scripting_folder.html
States that:
"The documentChildren and folderChildren properties return up to the first 1000 documents or folders, respectively, that are direct children of the selected folder".
My problem is that we have a few cases where there are more than 3000 documents attached to the case. Is there a way to get a list of of those child documents, or am I plain out of luck?
Discussion posts and replies are publicly visible
You can try to below approach:
1. get the total count of document
2. create a set of batch (Example: if there are 2500 documents, first fetch 1-1000, 1001-2000, 2001-2500). use the dynamic batches in pagination within for-each to get the documents, if all documents are in same folder
3. collect all in response and send back to requested application