- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2017 07:59 AM
Hi All,
We have created a list field on our incident table called u_escalated_to.. This is a reference to the sys_user_grmember table and has a simple filter of Group is SM Managers.
When you first select the name in the list it displays correctly.
Once you save the record it is displaying as the Sys_ID
Any suggestions on how to get it to retain the name rather than the sys_id?
Any help is greatly appreciated
Thanks
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2017 08:04 AM
Sorry Sam. Mistake on my part. Go to the script include and change the line:
list.push(grm.getValue('sys_id'));
to
list.push(grm.getValue('user'));
The list was creating a bad list of sys_ids.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2017 08:05 AM
I would recommend linking to `sys_user` instead of `sys_user_grmember`. You can still do a reference qualifier to limit results to that group. I would recommend adding a reference qualifier for active=true as well.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2017 08:05 AM
The reason is because sys_user_grmember doesn't have a display=true set on any field. The main reason for this is because it's a many-to-many table.
What I recommend instead is to reference sys_user and then create an advanced reference qualifier on that field to get the sys_ids of the group members.
http://wiki.servicenow.com/index.php?title=Reference_Qualifiers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2017 07:27 AM
Hi Chuck,
Thanks for the above. How do you find out that display does not work on a table so we can avoid this going forward? Only asking as we set display to true on the user field on the sys_user_grmember table:
In regards to the advanced reference qual, I'm not too sure on how best to do this to achieve the list to just show members of the group SM Managers?
Any ideas
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2017 06:50 AM
If you are referencing a many-to-many table (such as sys_user_grmember) there won't be a display value. That's the most common place. Any others are generally because the person who created the table forgot to set a display value - those are usually quickly remedied in development or test soon after.
Be careful of setting a display value on a many-to-many table as you did. It could have ramifications elsewhere. Check the user list in a group and check the group list in a user to make sure it is displaying properly in both places. I haven't tested this, but something tells me you might ask to look at a list of groups for that user and see a list of users... Double check please.
For more information on advanced reference qualifiers, see section 4.3 here:
http://wiki.servicenow.com/index.php?title=Reference_Qualifiers#Advanced_Reference_Qualifier_Example