Official Content

Returns the User Identification.

Syntax:

Userid()
 
Type Returned:
Character

Scope

Objects: Procedure, Transaction, Web Panel, Data Provider
Generators: .NET, .NET FrameworkJava, 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)

Description

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.

See Also

Work Station Function








Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant