IsLockedBy

You can use this function for Optiva Workflows.

Purpose

Checks if an object is locked and returns the user who locked it.

Syntax


Dim variable As String = IsLockedBy(Symbol, ObjectKey)

Arguments

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 user ID.

Value Description
0 Returns 0 if the object is not locked.
user ID Returns the ID of the user who checked it out if it is locked.

Examples

This example determines the user who has checked out the current object from which the Workflow was launched.


Dim rc As String = IsLockedBy()
If rc Is Nothing Then
MessageList(_OBJECTSYMBOL & " " & _OBJECTKEY & " not checked out.")
Else
MessageList(_OBJECTSYMBOL & " " & _OBJECTKEY & " checked out by" & rc)
End if

This example determines if a specific object has been checked out and if so by whom.


Dim rc As String = IsLockedBy("FORMULA", "FS-0010\0001")
If rc Is Nothing Then
MessageList( "Formula FS-0010\0001 is not checked out.")
Else
MessageList("Formula FS-0010\0001 is checked out by" & rc)
End if