- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2016 01:39 AM
Hi guys how can we add the current user's name to the "How Can We Help?" message on the main SP page? Please refer to attached screenshot. Thanks - Regina
Solved! Go to Solution.
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2016 05:04 AM
For the newly cloned widget...
Just write the below line in the Server part:
data.user = gs.getUserName();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2017 04:15 PM
If you just want to say Hi to the user with out Search bar
Create a New Widget ,
In HTML
<div>
<h1 style="color: #d9534f; text-align: center; background-color: #131416;"><strong>Hi {{data.name}},<br/>Welcome to Your company IT Service Portal</strong></h1>
</div>
In server Script
(function() { |
// Collect the User Info to Display Users First Name
data.sysUserID = gs.getUserID();
if (!data.sysUserID)
data.sysUserID = gs.getUser().getID();
var sysUserGR = new GlideRecord("sys_user");
data.userExists = sysUserGR.get(data.sysUserID);
if (data.userExists) {
data.name = sysUserGR.getValue("first_name");
} else {
data.name = "User";
}
})();
Client SIde : Leave as is and now use this widget on the top container
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-22-2019 07:44 AM
This is working great. However, has anyone got an translation working for the how can we help text in this cloned widget?