Next method: Folder collection

Syntax

Next()

Description

The Next method returns the next Folder object in the Folder collection. You can use this method only after you have used the First method: otherwise the system doesn’t know where to start.

Parameters

None.

Returns

A folder object.

Example

Local ApiObject &MySession, &Root, &Folders, &MyFolder;

&MySession = %Session;
&MyPortal = &MySession.GetPortalRegistry("ADMIN");

&Root = &MyPortal.GetRoot();
&Folders = &Root.Folders;

&MyFolder = &Folders.First();

For &I = 1 to &Folders.Count
   /* Do processing on folders */ 
   If &I <> &Folders.Count
      &MyFolder = &Folders.Next();
   End-If;
End-For;