How can i get the Employee Home page search widget to include logged in users name

DevtoSME
Giga Guru

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

7 REPLIES 7

Gangadhar Ravi
Giga Sage
Giga Sage

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

Sohail Khilji
Kilo Patron
Kilo Patron

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

LinkedIn - Lets Connect

Hi as im not proficient with JavaScript this is new to me. i am getting an error at the function. im not sure what to replace the scope with ?