Displaying user name next to the avatar icon

RforNewbie
Tera Guru

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?

 

RforNewbie_0-1690367815936.png (Service Portal)

 

RforNewbie_1-1690367839256.png (Employee Center)

 

Thanks in advance,

1 ACCEPTED SOLUTION

Jonathan Ting
Tera Guru

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>-->

 

 

 

 

JonathanTing_0-1690426986582.png

 

View solution in original post

8 REPLIES 8

Sure it might be a small customization to a widget. Though what I'm mentioning: is it worth it? What I see out there, at least 8 out of 10 developers/customers don't understand the consequences and will not maintain widgets, will pass out on future enhancements (or bugfixes or even security related fixes), etc.. Or what I see a lot on the Community: "this is the requirement"...

 

If it's something (if I understand you correctly) that looks to be prepared in the widget already though not fully worked out by ServiceNow: create a Support Case. Maybe it's known, maybe it's already targeted for an upcoming release, maybe ServiceNow was not aware of it.

 

Kind regards,
Mark

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

I get where you coming from, as I've had to deal with the consequences of customisation that have impacted upgrades and bug fixes. And a lot of these customisation have been done by ServiceNow elite partners. And that is why I don't understand the reasoning for cloning widgets, at least when you change the OOB widget, it will flag it for any changes with upgrades/patches.

 

But when users come to the community to ask a question, it doesn't really help when you just say it's a customisation and "is it worth it". Explaining how something works gives that users and other the knowledge to make the right business decision on how they want to manage their platform.  But next time I answer someone's question which may require some customisation, I'll be sure to add in the disclaimer of "is it worth it" to save you from posting.

 

Sorry RforNewbie for hijacking your thread

Employee Center is an evolution of Service Portal, so we still use some Service Portal based widgets and setup. I'd imagine overtime they will be enhanced etc. Because of how EC works though your not dropping the widget on the page etc., so the instance options are irrelevant.

 

Where as that same widget is used for Service Portals where it might be still relevant to have 

Dan O Connor
ServiceNow Employee
ServiceNow Employee

@RforNewbie While there is considerations to make in terms of managing a customised Header (which I always recommend against) you also need to ascertain what value this is bringing. As with any customisation, it's asking and discussing what is the purpose and value.

 

So here you need to be asking what is the value of showing someone their own name. Which is zero (in my opinion anyway)