GetSubCollection method (WinStudio scripts)
Applies To
IWSIDOCollection interface
Definition
Returns a specified object in a subcollection.
Syntax
varObject = object.GetSubCollection( string, long )
| Part | Description | 
| varObject | Required. A Visual Basic variable that is defined as an object and that references the object being returned from the subcollection. | 
| object | Required. The name of a valid IDO collection object. | 
| string | Required. The name of a subcollection. The subcollection name is the property name in the top-level collection. | 
| long | Required. An index number corresponding to a row in the top-level collection. A value of -1 specifies the current row. | 
Example
Sub Main()
   Dim oCache As IWSIDOCollection
   Dim iNumEntries As Integer
   Dim iLoopCounter As Integer
   oCache = ThisForm.PrimaryIDOCollection.GetSubCollection("UserGroupMaps", -1)
   iNumEntries = oCache.GetNumEntries
   iLoopCounter = 0
   Do While iLoopCounter < iNumEntries
       If Not oCache.IsObjectTheAutoInsertRow(iLoopCounter) Then
           If oCache.IsObjectModified(iLoopCounter) = False Then
              Application.ShowMessage("Row " & (iLoopCounter + 1) & " has NOT been modified.")
           Else
              Application.ShowMessage("Row " & (iLoopCounter + 1) & " has been modified.")
           End If
       Else
           Application.ShowMessage("No more rows.")
       End If
       iLoopCounter = iLoopCounter + 1
   Loop
End Sub