- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2022 05:06 AM
The ask is that when Some logs into our HR Employee Center - It says on the Banner which is a Title Widget - They are asking that it says something like "Welcome, <User's First name> to the HR Service Portal" Any ideas?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2022 10:01 AM
Hey Wendy,
I did something like what you want within a Widget - specifically HR Home Search widget. A person's name in the banner as you are showing may seem a bit large to some people. But that is just my own opinion.
For ours, I had the HTML display the Nickname of the user which is mapped to the user profile (sys_user) table created custom. It is not an OOTB field.
Looks like this:
If you wanted to do something like that, you would use the Widget in Editor option, which you can get to while on the portal page itself. Right-click on the Widget and select Widget in Editor:
Be sure to be in the correct application where the widget it stored
From within the widget editor you would need to change two things. The HTML and the Server Script to pull in the correct information and display that information.
HTML we did:
<div id="homepage-search" class="hidden-xs wrapper-xl">
<div class="wrapper-xl">
<h1 style="color:#FFFFFF; font-family: Arial">
Hello, {{data.nickName}}
</h1>
<h2 class="text-center text-4x m-b-lg sp-tagline-color" ng-bind="options.title"></h2>
<div ng-if="options.short_description" class="text-center h4 m-b-lg sp-tagline-color" ng-bind="options.short_description"></div>
<sp-widget widget="data.typeAheadSearch"/>
</div>
</div>
Server Script: notice the data we are bringing over for the nickname. Of course if you wanted nickname it would need to be something you already have in the system. Otherwise FirstName you can get which is already OOTB on the user table.
var aisEnabled = $sp.isAISearchEnabled();
data.firstName = gs.getUser().getFirstName();
data.nickName = gs.getUser().getRecord().getValue('u_nickname');
if (aisEnabled)
data.typeAheadSearch = $sp.getWidget('typeahead-search', options);
else
data.typeAheadSearch = $sp.getWidget('typeahead-search', options.typeahead_search);
This was just an idea to float your way.
Another Widget you could try to use as well would be the Content Experience widget. That has options to display a message / name as well. I would recommend that widget as well to display a message with a users name as you can do something very similar to what I have displayed to you using the HR Home Search Widget.
I hope this has helped you out/pointed in another optional direction.
Cheers,
-Rob

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2022 05:10 AM
Hi there,
With customizing the widget, certainly possible. Question though: is customization acceptable for the customer/your company?
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP
---
LinkedIn
Community article, blog, video list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2022 10:01 AM
Hey Wendy,
I did something like what you want within a Widget - specifically HR Home Search widget. A person's name in the banner as you are showing may seem a bit large to some people. But that is just my own opinion.
For ours, I had the HTML display the Nickname of the user which is mapped to the user profile (sys_user) table created custom. It is not an OOTB field.
Looks like this:
If you wanted to do something like that, you would use the Widget in Editor option, which you can get to while on the portal page itself. Right-click on the Widget and select Widget in Editor:
Be sure to be in the correct application where the widget it stored
From within the widget editor you would need to change two things. The HTML and the Server Script to pull in the correct information and display that information.
HTML we did:
<div id="homepage-search" class="hidden-xs wrapper-xl">
<div class="wrapper-xl">
<h1 style="color:#FFFFFF; font-family: Arial">
Hello, {{data.nickName}}
</h1>
<h2 class="text-center text-4x m-b-lg sp-tagline-color" ng-bind="options.title"></h2>
<div ng-if="options.short_description" class="text-center h4 m-b-lg sp-tagline-color" ng-bind="options.short_description"></div>
<sp-widget widget="data.typeAheadSearch"/>
</div>
</div>
Server Script: notice the data we are bringing over for the nickname. Of course if you wanted nickname it would need to be something you already have in the system. Otherwise FirstName you can get which is already OOTB on the user table.
var aisEnabled = $sp.isAISearchEnabled();
data.firstName = gs.getUser().getFirstName();
data.nickName = gs.getUser().getRecord().getValue('u_nickname');
if (aisEnabled)
data.typeAheadSearch = $sp.getWidget('typeahead-search', options);
else
data.typeAheadSearch = $sp.getWidget('typeahead-search', options.typeahead_search);
This was just an idea to float your way.
Another Widget you could try to use as well would be the Content Experience widget. That has options to display a message / name as well. I would recommend that widget as well to display a message with a users name as you can do something very similar to what I have displayed to you using the HR Home Search Widget.
I hope this has helped you out/pointed in another optional direction.
Cheers,
-Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2022 11:08 AM
Thank you

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2022 08:59 PM
You're welcome, Wendy!