Reference field pop-up form in Service Portal for User info

Robin Hearne
Tera Expert

We have a many Catalog Items which use a reference Variable on the sys_user table.  If a user selects their own account then they can see their information on the pop-up form by clicking on the round information icon.  Unfortunately if they select a different user then the form contains no data as shown below:

 find_real_file.png

find_real_file.png

This causes an issue when there are multiple employees with the same name as the requester has no way to verify that they've selected the correct user.

What do I need to do to enable all users to see basic details of all other users on this form (name, title, email address)?

Regards,

Robin

1 ACCEPTED SOLUTION

Oleg
Mega Sage

It seems to me you have two problems:

  1. displaying details about the selected user on click on "i" (info) button of reference field
  2. displaying more information during choosing of the user (in case of changing the user)

The first problem can be solved by changing ACL on sys_user table either on table level or on fields level (or both). You should examine existing ACLs and adjust there to allow everybody to read at least the name and the email.

The second problem can be solved by adding the following attributes on the user's reference field

ref_ac_columns=email,ref_ac_columns_search=true,ref_auto_completer=AJAXTableCompleter

As the result one will see in Service Portal email of users together with the user's name:

find_real_file.png

the same changes will be not only on Service Portal. "Classical" UI will display the same information too:

find_real_file.png

 

View solution in original post

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Robin,

there is out of box read acl which allows user to view only their own user record and not others

ACL: sys_user.*

Script:

if (gs.getUserID() == current.sys_id || gs.getUser().hasRoles())
answer = true;
else
answer = false;

you would require to modify the above

User A can see only his/her record/field information; he/she can't see User B's detail.

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Oleg
Mega Sage

It seems to me you have two problems:

  1. displaying details about the selected user on click on "i" (info) button of reference field
  2. displaying more information during choosing of the user (in case of changing the user)

The first problem can be solved by changing ACL on sys_user table either on table level or on fields level (or both). You should examine existing ACLs and adjust there to allow everybody to read at least the name and the email.

The second problem can be solved by adding the following attributes on the user's reference field

ref_ac_columns=email,ref_ac_columns_search=true,ref_auto_completer=AJAXTableCompleter

As the result one will see in Service Portal email of users together with the user's name:

find_real_file.png

the same changes will be not only on Service Portal. "Classical" UI will display the same information too:

find_real_file.png

 

Appreciate this is an old post, but came across it as you solved the same issue I am having when wanting to expand the information provided to users in a reference field, in our portal.

 

However not sure where to insert the attribute you have outlined below

The second problem can be solved by adding the following attributes on the user's reference field

Do you just do to the dictionary entry for the field in question, or the field being referenced? 

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Robin,

Any update on this?
Can you mark my answer as correct, helpful if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader