This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20.6
LOCKED BY
|
LOCKED BY ( {aTable ;} process ; 4Duser ; sessionUser ; processName ) | ||||||||
Parameter | Type | Description | ||||||
aTable | Table |
![]() |
Table to check for record locked, or Default table, if omitted | |||||
process | Longint |
![]() |
Process reference number | |||||
4Duser | String |
![]() |
4D user name | |||||
sessionUser | String |
![]() |
Name of user that opened work-session | |||||
processName | String |
![]() |
Process name | |||||
LOCKED BY returns information about the user and process that have locked a record. The process number(*), the user name in the 4D application and in the system as well as the process name are returned in the process, 4Duser, sessionUser, and processName variables. You can use this information in a custom dialog box to warn the user when a record is locked.
(*) This is the number of the process on the machine where the code that actually locked the record is executed. In the case of a trigger or a method that is executed on the server, the number of the "twin" process on the server machine is returned. In the case of a method that is executed on a remote application, the number of the process on the remote machine is returned.
If the record is not locked, process returns 0 and 4Duser, sessionUser, and processName return empty strings. If the record you try to load in read/write has been deleted, process returns -1 and 4Duser, sessionUser, and processName return empty strings.
The 4Duser parameter returned is the user name from the 4D password system or the user alias as defined with the SET USER ALIAS (if any). If there is no password system or alias defined, “Designer” is returned.
The sessionUser parameter returned corresponds to the name of the user that opened the session on the client machine (this name is displayed more particularly in the 4D Server administration window for each open process).
If the record has been locked by a $lock REST request:
Product: 4D
Theme: Record Locking
Number:
353
Modified: 4D v11 SQL Release 2
Renamed: 4D v14 R3 (LOCKED ATTRIBUTES)
Modified: 4D v19 R4
4D Language Reference ( 4D v20)
4D Language Reference ( 4D v20.1)
4D Language Reference ( 4D v20.2)
4D Language Reference ( 4D v20.3)
4D Language Reference ( 4D v20.4)
4D Language Reference ( 4D v20.5)
4D Language Reference ( 4D v20.6)