Retrieves the children of the folder given as the folderId
parameter, obeying the given pagingInfo
.
a!cmiGetFolderChildren( scsExternalSystemKey, usePerUserCredentials, atomPubUrl, repositoryId, folderId, paginInfo)
Common Parameters:
scsExternalSystemKey: (Text) The key from the Third Party Credentials admin console page that corresponds to the set of credentials that should be used to authenticate.
usePerUserCredentials: (Boolean) If true
the credentials set in the Third-Party Credentials settings page by the current user running the expression will be used. If false
the site-wide credential values will be used.
atomPubUrl: (Text) The Atom Pub URL of the CMIS target system.
repositoryId: (Text) The repository id on the CMIS target system.
Specific Parameters:
folderId: (Text) The object id of the CMIS folder.
pagingInfo: (PagingInfo) The start index and batch size of the list of objects to retrieve, created with a!pagingInfo()
. Unlike most indexes in Appian, the start index is 0-based instead of 1-based to match the indexing scheme used by CMIS. The sort values in the paging info are ignored.
The function returns the standard connector result dictionary described in the main Connectors page.
If successful, the result
field contains a dictionary representation of the objects within the given folder.
If called multiple times in the same expression with the same parameters, only one query is made when the expression is evaluated and the result is reused for each identical call. This caching only applies within a single expression evaluation. Return values are not cached in separate expressions, or in separate evaluations of the same expression.
Get the Contents of a Folder in CMIS
This example returns an array with the contents of the folder if the query is successful. Otherwise, it returns a message with the error encountered.
Copy and paste the expression below in an expression rule, replace the <folderId>
text with a valid folder id in CMIS, e.g. workspace://SpacesStore/becc294e-e3df-4c8a-a548-9bbf61a29026
, and click Test Rule.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
=a!localVariables(
local!cmisResult: a!cmiGetFolderChildren(
scsExternalSystemKey: cons!CMIS_SCS_KEY,
usePerUserCredentials: true,
atomPubUrl: cons!CMIS_URL,
repositoryId: cons!CMIS_REPO_ID,
folderId: "<folderId>",
pagingInfo: topaginginfo(0, 10)
),
if(local!cmisResult.success,
local!cmisResult.result,
local!cmisResult.error
)
)