CheckOut

You can use this function for Optiva Workflows.

Purpose

Locks an object.

Syntax


Dim variable As Integer = CheckOut(symbol, keycode)

Arguments

Part Description
Symbol Object symbol. Leave blank for the current object of the workflow.
KeyCode Object to lock. Leave blank for the current object of the workflow.

Description

Checkout locks an object. It returns a value of 0 or 1.

Value Description
0 Did not check out the object. May already be checked out.
1 Checked out the object.

If the object is already checked out and the workflow returns 0, you can use IsLockedBy to verify by whom.

Examples

This example checks out the current object from which the Workflow was launched


Dim rc As Integer = CheckOut("","")
If rc = 1 Then
MessageList(_OBJECTSYMBOL & " " & _OBJECTKEY & " checked out.")
Else
MessageList(_OBJECTSYMBOL & " " & _OBJECTKEY & " not checked out.")
End if

This example checks out a specific object


Dim rc As Integer = CheckOut("FORMULA","FS-0010\0001")
If rc = 1 Then
MessageList("Formula FS-0010\0001 has been checked out.")
Else
MessageList("Formula FS-0010\0001 could not be checked out.")
End if