IsLockedBy
You can use the IsLockedBy function to check if an object is locked and identify the user who locked the object.
When to use
You can use this function to:
- Identify the user who has checked out an object.
- Handle user-specific locks during workflow automation.
Syntax
string IsLockedBy(string objSymbol, string objKey);
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| objSymbol | string | Yes |
The symbol of the object.
Note: You can use empty quotation marks ("") for the current workflow symbol.
|
| objKey | string | Yes |
The key of the object.
Note: You can use empty quotation marks ("") for the current workflow symbol.
|
Return Value
- The application returns a value zero (0) if the object is not locked.
- If the object is locked, the application returns the user ID of the user who checked out the object.
Prerequisites
- The object needs to exist and be accessible.
- No special permissions are required to check the lock status.
Examples
- Example 1
-
String lockedByUser = IsLockedBy("FORMULA", "FS-0010\0001");
- Description
- This example determines if the formula FS-0010\0001 has been checked in and returns the user it is locked.
- Example 2
-
String lockedByUser = IsLockedBy();
- Description
- This example determines the user who has checked in the current object from which the workflow is launched.