AX2376
GetUserInfo function
Returns information about an Axiom Software user, as defined in Security.
NOTE: You can use a data lookup to return the same information as a GetUserInfo function. Whenever possible, it is recommended to use data lookup queries over Axiom functions for faster performance.
Syntax
GetUserInfo("CodeName", "UserName", "UserID", "Domain")
Parameter | Description |
---|---|
CodeName |
Specifies the user property to return. Use one of the following values:
|
UserName |
Optional. The login name of the user for which you want to return information. If specified, the UserID parameter is ignored. |
UserID |
Optional. The database ID of the user for which you want to return information. This parameter can be used instead of UserName to specify a user. |
Domain |
Optional. The Active Directory domain of the user. The domain property only applies to users that have been imported from Active Directory. Manually created users do not have a value for domain. You might be required to specify a domain to identify the correct user if users have been imported from multiple Active Directory domains and have the same user name. If all user names are unique across domains, then it is not necessary to specify the domain. |
- If both UserName and UserID are left blank, then GetUserInfo returns information for the current user.
- If either UserName or UserID is specified, then GetUserInfo returns information for that user.
All non-numeric entries must be placed in double quotation marks, unless you are using cell references to reference the text held in another cell.
Remarks
GetUserInfo is a volatile function.
Examples
=GetUserInfo("UserName")
This example returns the login name for the current user. For example: "jdoe".
=GetUserInfo("FirstName")
This example returns the first name of the current user. For example: "John".
=GetUserInfo("UserID","jsmith")
This example uses the optional second parameter to return the user ID of the user jsmith. For example: "17".
=GetUserInfo("UserName",,17)
This example uses the optional third parameter to return the login name of the user with ID 17. For example: "jsmith".
=GetUserInfo("UserEmail","jsmith",,"Corporate")
This example returns the email address of user jsmith who was imported from the Corporate domain. This would be necessary if another user named jsmith was imported from a different Active Directory domain.