- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2023 07:58 AM
Hi,
I can't find a definitive answer on how to add the user's name to the Welcome message on the Service Portal. so as Below, but Hi Dan - how can we help?
Can someone please advise the best way?
Many thanks,
Dan
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2023 09:12 AM
Hi Dan,
according to this KB article you can do the following:
- Clone the Homepage Search widget
- In the cloned widget, change the client controller as follows
function() {
/* widget controller */
var c = this;
c.data.greeting = 'Hi ' + scope.user.first_name;
}
3. Change your Angular ng-bind value in the HTML template to data.greeting.
<h1 class="text-center text-4x m-b-lg sp-tagline-color" ng-bind="data.greeting"></h1>
Best regards,
Patrick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2023 09:12 AM
Hi Dan,
according to this KB article you can do the following:
- Clone the Homepage Search widget
- In the cloned widget, change the client controller as follows
function() {
/* widget controller */
var c = this;
c.data.greeting = 'Hi ' + scope.user.first_name;
}
3. Change your Angular ng-bind value in the HTML template to data.greeting.
<h1 class="text-center text-4x m-b-lg sp-tagline-color" ng-bind="data.greeting"></h1>
Best regards,
Patrick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2023 09:56 AM
You could create a custom widget.
In the Server Script use :
data.firstName = gs.getUser().getFirstName();
In the Body Html template use
<div>Hi {{c.data.firstName}}, How can I help?</div>
Then add the widget to your page.