LoadInReverse property (WinStudio scripts)

Applies To

IWSIDOCollection interface

Definition

Indicates whether the collection is loaded in first-to-last order (False) or last-to-first order (True). The default is False.

Get Syntax

object.LoadInReverse

  Part   Description
object Required. A reference to an IDO collection object.

Set Syntax

object.LoadInReverse = Boolean

  Part   Description
object Required. A reference to an IDO collection object.
Boolean Required. A Boolean value indicating whether the collection is to be retrieved in ascending (True) or descending (False) order.

Remarks

With the default behavior (this property set to False), using the initial Refresh action or exiting Filter-In-Place gets the top n rows, and the GetMoreRows method retrieves batches of n rows in descending order, appending them to the collection. If this property is set to True, the initial Refresh gets the last n rows, and the GetMoreRows method retrieves batches of n rows in ascending order, prepending them to the collection.

Note: When changing this setting, do not immediately call GetMoreRows. A call to Refresh or to leave Filter-In-Place should follow.

Example

Sub Main()
   ' Loads the primary collection backwards
   If Not ThisForm.PrimaryIDOCollection.LoadInReverse Then
      ThisForm.PrimaryIDOCollection.LoadInReverse = True
      ThisForm.PrimaryIDOCollection.Refresh()
   End If
End Sub