SaveEnabled property (WinStudio scripts)

Applies To

IWSIDOCollection interface

Definition

Enables/Disables the ability to save a specified IDO collection, or returns a value indicating whether the collection can be saved.

Set Syntax

object.SaveEnabled = Boolean

  Part   Description
object Required. A reference to a valid IDO collection object.
Boolean Required. Determines whether the collection can be saved:
  • True: The collection can be saved.
  • False: The collection cannot be saved.

Get Syntax

object.SaveEnabled

  Part   Description
object Required. A reference to a valid IDO collection object.

Remarks

For the get syntax, a return value of:

  • TRUE indicates that the collection can be saved.
  • FALSE indicates that the collection cannot be saved.

If the Save operation is disabled, the user cannot save changes to a collection. In this case, the Save and Close toolbar button only closes the collection, without first saving it.

Examples

Sub Main()
   Dim oCache As IWSIDOCollection
   Dim sOption As String
   oCache = ThisForm.CurrentIDOCollection
   sOption = Trim(GetParameter(0))
   If sOption = "SAVE" Then
      oCache.SaveEnabled = True
   End If
End Sub
Sub Main()
   Dim oCache As IWSIDOCollection
   oCache = ThisForm.CurrentIDOCollection
   If oCache.SaveEnabled Then
      oCache.SaveEnabled = False
      Application.ShowMessage("You cannot save the collection at this time.")
   Else
      oCache.SaveEnabled = True
      Application.ShowMessage("You can now save the collection.")
   End If
End Sub