AX2376

GetUserInfo function

Returns information about an Axiom Budgeting and Forecasting for Higher Education 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")

NOTE: If the entry for any parameter depends on a value returned by another data lookup row, then that row must be in a different data source and executed before this row is executed. For more information, see Dependent data lookups.

Parameter Description

CodeName

Specifies the user property to return. Use one of the following values:

  • UserID: Returns a user's database ID (a numeric value assigned by Axiom Budgeting and Forecasting for Higher Education).
  • UserName: Returns a user's login name.
  • UserEmail: Returns a user's email address.
  • FirstName: Returns a user's first name.
  • LastName: Returns a user's last name.
  • Domain: Returns a user's Active Directory domain. This returns blank for users that were not imported from Active Directory.

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.

Result

The Result column is where the return value for the row is placed when the data lookup is executed. You can reference this cell to use the return value in other areas of the file.

This column must be present in order for the data lookup to be valid.

IsError

Optional. Indicates whether the return value for the data lookup was an error.

  • If TRUE, the return value is an error. This may be an Axiom #ERR code, a specific error message, or a custom error message defined in the data lookup (such as the GetData invalid query message).
  • If FALSE, the query executed successfully.

The IsError column can be helpful if you need to set up formulas with error trapping. Instead of using the ISERROR Excel function, you can use a construction such as:

=IF(Info!$M$10=True, "", Info!$L$10)

Where the IsError column is in M10 and the Result column is in L10. If the data lookup returns an error, this function returns blank instead of displaying the error.

  • 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.

(missing or bad snippet)

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.