Returns the User Identification.
Userid()
Type Returned:
Character
Objects: Procedure, Transaction, Web Panel, Data Provider
Generators: .NET, .NET Framework, Java, RPG, Cobol, Ruby (up to GeneXus X Evolution 3), Visual FoxPro (up to GeneXus X Evolution 3), Visual Basic (up to GeneXus X Evolution 3)
If the variable is defined in N characters and the user assigned to it is longer than the variable length, the characters will be truncated.
In the iSeries environment, this function returns the User Identification defined in the User Profile.
In a PC environment, this function returns the user's name (using API Windows functions) if the LOGNAME environment variable is not set. Otherwise, this variable's value is used. This is the expected behavior whether there is network support or not.
In a Client/Server environment, this function could also return the identification of the user connected to the database server. If the user is not connected, the function returns blank spaces. It must be written using the following syntax: USERID('Server'). The word Server must be written between quotes as shown.
Note: You cannot use this function if the
Connect to server property has the value “At first request”, and the database has not been accessed yet.
Work Station Function