- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2016 09:49 AM
Hi all,
Has anyone successfully updated the "Homepage Search" widget (or created their own) so rather than displaying the generic heading as per below:
It displays much the same way that the HI service portal homepage is configured by displaying a custom "Hi (first name of logged in user)". Example below.
This would give our portal a more personal experience.
Cheers, Nathan.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2016 06:29 PM
Server script:
(function() {
/* populate the 'data' object */
/* e.g., data.table = $sp.getValue('table'); */
data.sysUserID = gs.getUserID();
if (!data.sysUserID)
data.sysUserID = gs.getUser().getID();
var sysUserGR = new GlideRecord("sys_user");
data.userExists = sysUserGR.get(data.sysUserID);
if (data.userExists) {
data.name = sysUserGR.getValue("first_name");
} else {
data.name = "User"
}
})();
HTML:
Edit this line and include the data.name element
<h1 class="text-center font-thin hidden-xs text-4x m-b-lg sp-tagline-color">{{options.title}} {{data.name}}?</h1>
In my case it show a message: "How can we help you, Diego?"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2016 06:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2016 06:48 AM
You have to go into the widget editor, not the gear.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2016 06:42 AM
Interesting... the html code you provide didn't work for us, but this one did:
<h1 class="text-center font-thin hidden-xs text-4x m-b-lg sp-tagline-color"><span class="text-center text-1x m-b-lg sp-tagline-color" ng-bind="options.title"></span> {{data.name}}?</h1>

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2018 05:12 AM
Although the answer marked as correct does work, to display the user's name you can simply use {{user.first_name}} - no need to lookup, it's already available and ready to use.
<h1 class="text-center font-thin hidden-xs text-4x m-b-lg sp-tagline-color">Hi {{::user.first_name}}, {{options.title}}</h1>

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2018 12:58 PM
Thanks. I was able to clone the homepage search widget and make the changes that was in the marked correct answer and then I added your h1 class html edit in place of the one they listed.
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!