- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 03:38 AM
Hello everyone,
I am having trouble displaying the user name next to the avatar icon in employee center, in the case of Service Portal this is OOTB, is there any way to replicate in employee center?
(Service Portal)
(Employee Center)
Thanks in advance,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 08:03 PM - edited 07-26-2023 08:06 PM
The new header calls the 'Profile With Drop Down' widget and there's an option to show the username, but it doesn't give you an option to set this, as normally you would set the option in the widget instance.
So probably the easiest way around this is to comment out the if statement and just add in the required code to display the username.
<span class="visible-lg-inline">{{::user.name}}</span>
<!-- <span ng-if="options.showUsername == true" class="visible-lg-inline">{{::user.name}}</span>
<i ng-if="options.showUsername != true" class="m-l-xs fa fa-caret-down"></i>-->
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 08:03 PM - edited 07-26-2023 08:06 PM
The new header calls the 'Profile With Drop Down' widget and there's an option to show the username, but it doesn't give you an option to set this, as normally you would set the option in the widget instance.
So probably the easiest way around this is to comment out the if statement and just add in the required code to display the username.
<span class="visible-lg-inline">{{::user.name}}</span>
<!-- <span ng-if="options.showUsername == true" class="visible-lg-inline">{{::user.name}}</span>
<i ng-if="options.showUsername != true" class="m-l-xs fa fa-caret-down"></i>-->
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2024 02:11 AM
For this code changes where to navigate in Servicenow

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 09:06 PM
Hi there,
Unfortunately what you are asking is not a configurable option. If wanting to do so, you can follow the approach Jonathan is mentioning. Do ask yourself, is editing such (cloning and) editing multiple widgets worth it? Are you also going to maintain those widgets upon upgrades etc? Most customers don't, so they will miss updates in future patches/releases/store versions. So is it worth it?
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
07-26-2023 09:36 PM
That is a good point Mark, but you have to question why ServiceNow created an option on widget, but not have a way to call when using the widget from the portal config. If you were to put this widget directly on a page, you would have a config option to show the username.
In this instance, I would edit the 'Profile With Drop Down' widget and that way it's only one customisation and it will get flagged if there was any changes.