- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2023 05:49 AM
I have a requirement to make a catalog item visible only to managers on the service portal and hide it from general end-users. I don't see any field in the user record that indicates manager same as affiliation type example ( employee, temp staff). Any idea how to filter out only the manager.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2023 02:08 PM
Hi Indira,
I would create a user criteria "User is a manager" with this script:
answer = checkIfManager(); function checkIfManager(){ var gr = new GlideRecord('sys_user'); gr.addQuery('manager', gs.getUserID()); gr.query(); return gr.hasNext(); }
and associate this User Criteria in the Access > Avalaible for on the Catalog Item using the Catalog Builder.
JP

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2023 02:08 PM
Hi Indira,
I would create a user criteria "User is a manager" with this script:
answer = checkIfManager(); function checkIfManager(){ var gr = new GlideRecord('sys_user'); gr.addQuery('manager', gs.getUserID()); gr.query(); return gr.hasNext(); }
and associate this User Criteria in the Access > Avalaible for on the Catalog Item using the Catalog Builder.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2023 06:39 PM
Hello @IndiraH
Greetings!
Is the form record producer?
Check if there is existing user criteria for managers and add it to the Available for in the form.
If not, create one as Kyndryl mentioned
please mark the answer as correct and helpful if helped!
Kind Regards,
Ravi Chandra.