IsLocked

You can use this function for Optiva Workflows.

Purpose

Determines if an object is locked (i.e., checked out).

Syntax


Dim variable As Integer = IsLocked(Symbol, ObjectKey)

Description

IsLocked checks the locked (i.e., checked out) status of a formula.

Part Description
Symbol Object symbol. Leave out for the current object of the workflow.
KeyCode Object code. Leave out for the current object of the workflow.

It returns a value of 0 or 1.

Value Description
0 Returns 0 if the object is not locked.
1 Returns 1 if the object is locked.

Use CheckIn or CheckOut depending on the return value.

Note: You can override security and change a locked formula using Workflow. Use discretion when overriding security.

Examples

This example determines if the current object from which the Workflow was launched has been locked (i.e., checked out).


Dim rc As Integer = IsLocked()
If rc = 1 Then
MessageList(_OBJECTSYMBOL & " " & _OBJECTKEY & " is locked.")
Else
MessageList(_OBJECTSYMBOL & " " & _OBJECTKEY & " not locked.")
End if

This example determines if a specific object has been locked (i.e., checked out).


Dim rc As Integer = IsLocked("FORMULA", "FS-0010\0001")
If rc = 1 Then
MessageList( "Formula FS-0010\0001 is currently checked out.")
Else
MessageList("Formula FS-0010\0001 is not checked out.")
End if