Retrieving child folders
After retrieving the InfoStore
object with the RetrieveIStore function, the first thing that you will want to do is to retrieve a list of all the top level folders in the APS. However, rather than create a function that only retrieves top-level folders, you can write a generic routine to retrieve a list of folders at any level so that the user can navigate through both child folders and their parents.
Adding a function header
Add the following function header to the Folders.csp file:
Function RetrieveChildFolders(IStore, ParentID, FolderNames, IDs)
This function takes four parameters that may be described as follows:
Parameter
| Description
|
ParentID
| The ID number of the folder that owns the sub-folders that needs to be retrieved.
|
IStore
| The object that enables the APS to be queried for folders.
|
FolderNames
| FolderNames provides a variable to store the names of the sub-folders that will be returned from the server. These are required in order to be displayed as links in the user's browser.
|
IDs
| IDs provides a variable to store the IDs of the sub-folders that are returned from the server. These are required so that the correct folders are shown when the user clicks a folder link.
|
Go to next step:
Using the Crystal Enterprise query language