So I am doing some cool things to the reports to add flavor. What I have done is added a Greeting to the cover page of the reports so that it displays the USERPRINCIPLENAME() for the logged in individual along with a greeting based on time of day. For my organization, the USERPRINCIPLENAME() is the email address and not the actual name.
Is it possible for me to create a table that has the individuals email address and their display name and some get it to use the display name instead of the USERPRINCIPLENAME()?
So instead of displaying Good Afternoon firstname.lastname@example.org it will display Good Afternoon Michael Williams.
My current formula is:
VAR user = USERPRINCIPALNAME()
Var hour = HOUR(NOW())
VAR minute = MINUTE(NOW())
VAR prefix = SWITCH(
hour<12, “Good Morning”,
hour<17, “Good Afternoon”,
RETURN CONCATENATE(prefix&" ", user)