CollectionCap property (WinStudio scripts)

Applies To

IWSApplication interface

Definition

Returns or sets an integer value that indicates the maximum number of records to be retrieved when querying a collection.

Get Syntax

Application.CollectionCap

Set Syntax

Application.CollectionCap = integer

Remarks

An integer value of 0 indicates that there is no limit to the number of records that can be retrieved. A value of -1 indicates that the system default collection cap is to be used.

Note: You can confirm the return value or that the value has been correctly set using the User Preferences window.

Examples

This example displays a message box that tells what the current collection cap is.

Sub Main()
   Dim colCap As String
   colCap = Application.CollectionCap.ToString()
   Application.ShowMessage("The current collection cap is " & colCap & ".")
End Sub

This example shows how to use this property to set the collection cap programmatically.

Sub Main()
   Application.CollectionCap = 75
End Sub