Adding field in Tech assist portal

Abishek1998
Tera Contributor

Hi all,

 

I want to add a Employee number field in the work details section which is available in the my profile of service Portal. 

I tried adding a field in work details section from sn_employee_overview_section TABLE. But still the changes are not reflecting in portal?

 

I have attached the image.

1 ACCEPTED SOLUTION

alexalejandro
ServiceNow Employee

@Abishek1998 Have you tried to edit the widget directly in the portal? Maybe using page designer will help. 

Find the widget used (commonly something like):
  • User Profile
  • Employee Profile
  • or a custom clone

Check the widget’s HTML / server script

Look for something like:

 
data.user = $sp.getUserRecord();
 

or:

 
data.user = {
  department: user.department,
  title: user.title

};
// specific
 
👉 If it’s the second case, your field is NOT included automatically.
 
add your field to the server script:
data.user.employee_number = user.employee_number;
 
Then, also update the HTML:
<div>
  <label>Employee Number</label>
  <span>{{data.user.employee_number}}</span>
</div>

 

 

If it is using $sp.getUserRecord()

Then the issue is usually:

  • The field is not on the sys_user table
  • OR it’s not readable due to ACLs

Check:

  • Is your employee number field actually on sys_user?
  • Does it have read access for the logged-in user?

View solution in original post

5 REPLIES 5

alexalejandro
ServiceNow Employee

@Abishek1998 Have you tried to edit the widget directly in the portal? Maybe using page designer will help. 

Find the widget used (commonly something like):
  • User Profile
  • Employee Profile
  • or a custom clone

Check the widget’s HTML / server script

Look for something like:

 
data.user = $sp.getUserRecord();
 

or:

 
data.user = {
  department: user.department,
  title: user.title

};
// specific
 
👉 If it’s the second case, your field is NOT included automatically.
 
add your field to the server script:
data.user.employee_number = user.employee_number;
 
Then, also update the HTML:
<div>
  <label>Employee Number</label>
  <span>{{data.user.employee_number}}</span>
</div>

 

 

If it is using $sp.getUserRecord()

Then the issue is usually:

  • The field is not on the sys_user table
  • OR it’s not readable due to ACLs

Check:

  • Is your employee number field actually on sys_user?
  • Does it have read access for the logged-in user?