- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2022 10:48 AM
Hello-
I have added an ACL for the sys_user_group to have read access to the table. I have a catalog item with a reference to this table to allow users to select the required support and approval group for a business application. I cannot get this to field to populate any options for a user with no roles. ITIL and Admin can see them just fine. I have added the below script to the advance section as well as I have previously done for another table.
if (gs.getUserID() == current.sys_id || gs.getUser().hasRoles())
answer = true;
else
answer = false;
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2022 09:26 AM
Can you try with just
answer = true;
You are only giving read access to Name field. You can add conditions later.
Vinod Kumar Kachineni
Community Rising Star 2022

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2022 10:53 AM
Hi,
Sorry, your script doesn't really make sense. Please review that?
Your script is saying if the current user's ID equals the current record's sys_id? That would never happen or the current user has any role at all, which also wouldn't happen because you said they have no rules?
You leave the roles section empty and the script section empty as well and just have it as a read ACL, additionally you could also try using script as:
answer = !gs.getUser().hasRoles();
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2022 12:23 PM
Unfortunately both of these methods still return no results.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2022 12:28 PM
Hi,
Sorry. Can you actually show what you've done? An entire screenshot of your ACL and the script section, etc.?
What I've mentioned is pretty basic and should work and is prescribed from ServiceNow as mentioned here: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0720034
If you don't mind, can you give more back to the post than just saying it doesn't work?
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2022 12:37 PM