UserEmail

Returns the email address of the currently logged in user. 

  • Returned Output: Text
  • Library: PQL \ Common \ Identity
  • Version: 2018.00.000
  • Compatibility:
    • Can be combined with and other PQL function throughout the application.
    • It CANNOT be used with MDX or VBA functions. But it can be used on MDX-based content in other parts of the application.

Syntax

UserEmail()

Comments
  • The function returns a text string of the user's registered email address.
  • The function takes no inputs
  • The function is often used to customize the way queries or formula's operate based on the user that is currently running a report or dashboard. It can also be used in driving member level security for data models - allowing a data model to be customized for each user logging into the application.
Different Function types
  • The other "identity" functions can be used to secure and customize the analytics experience. For more see the UserName function.

Examples

This example shows how to use the function to build a personalized welcome message for the logged in User "Avi".

"Dear " + UserfirstName() + ", a copy of this report has been generated and will be emailed to you at " + UserEmail() + "."

The natural language template allows us to formulaically build out the message using a combination of the user's recorded first name and email address. This can be driven from Present, Publish or Illustrate dynamic text functionality, as shown below.