Last active
August 29, 2015 14:27
-
-
Save mattmetten/47cf136dee69e53572fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--Do a look-up and find the First Name of the current user --> | |
<g:evaluate> | |
var name = gs.getUser().getFirstName() | |
if(name == ''){ | |
<!--If there is no value for First Name, then query the sys_user table and get the user_name value --> | |
var usr = new GlideRecord('sys_user'); | |
usr.get(gs.getUserID()); | |
name = usr.user_name.getDisplayValue() | |
} | |
if(name == ''){ | |
name ="empty"; | |
} | |
</g:evaluate> | |
<!-- Wrap the actual value however you choose (i.e. H3 or p tags) --> | |
<div class="user_name"> | |
${name} | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment