How can i get the Employee Home page search widget to include logged in users name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2024 11:25 AM
I need to include the logged in users name in the homepage search bar so it can say something like
"Hello John, how can i help you"
i have seen a few community post with server side script but it does not include the original server widget code that has the asisearch enabled. As i am not js proficient i would like to know what all should be included in the server script and html
any help would be appreciated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2024 01:17 PM
Hi,
Please follow steps in this KB.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0791707
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2024 02:19 PM
the code tht i using isnt working do you know if this is correct.
function() {
/* widget controller */
var c = this;
c.data.greeting = 'Hi ' + g_userID.user.first_name;
}
the syntax checker is saying something is off
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2024 02:32 PM
Try this :
function($scope) {
var c = this;
c.welcome = 'HI'+ $scope.user.first_name + "How can i help you ?";
}
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2024 02:43 PM