InsertItem method: Folder collection
Syntax
InsertItem(FolderName, Label)
Description
The InsertItem method inserts the folder object identified by FolderName from the Folder Collection. You must specify both a name and a label for all folders. This method returns a reference to the new folder object. You must specify a unique FolderName, or you receive an error.
Note:
The portal registry classes execute some methods "interactively", that is, as they happen. The item won't be marked for insertion, then actually inserted later. The item is inserted into the database as soon as the method is executed.
Parameters
| Parameter | Description |
|---|---|
|
FolderName |
Specify the name of a folder existing in the folder collection. This parameter takes a string value. |
|
Label |
Specify a label for the new folder. This parameter takes a string value. |
Returns
A reference to the new Folder object if the method executed successfully, null otherwise.
Example
&DeptHPFldr = &MyPortal.Folders.InsertItem("PORT0145", "HR Folder for Department⇒
0145");