User Criteria script based on an access group membership
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2018 09:52 AM
Hello,
We have a 2 tables setup 1 called Access Groups and another called Access Group members. I want to have a user criteria script to state, if user is part of this access group, they can see this catalog item. if they are not, then it is not showing.
how would that be scripted?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2018 10:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2018 10:33 AM
I know of this part but the item i want is not the OOB item listed there. It is a custom table

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2018 10:58 AM
You can do advance script something like. Add your table and query below is way on how you can do it.
var gr = new GlideRecord('sys_user');
gr.addQuery('sys_id', gs.getUserID());
gr.addEncodedQuery('department.name=Techonology');
gr.addActiveQuery();
gr.query();
gr.next();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2018 11:15 AM
Your script basically needs to provide a true or false answer. The following Doc provides a few examples: