User Criteria Catalog Item Alert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2024 12:55 PM
Hello everyone,
I have created this User Criteria to prevent access to all users that contain the keyword "Manager" in their firstname and/or their lasname, in addition to this I need this message to be displayed when I select a user "Manager" in a variable of the Catalog Item of type references to the "sys_user" table through this same User Criteria. The photo is an example of a User Criteria box that displays the message in case users who do not belong to a specific location are selected. Any ideas ?
Greetings and thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2024 01:19 PM
Hi @Tomas Linde ,
Can you please share screenshots of your user criteria here?
If my response helped you, please click on "Accept as solution" and mark it as helpful.
- Saloni
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2024 01:30 PM
function evaluateControl() {
var user = new GlideRecord('sys_user');
user.get(gs.getUserID());
var firstName = user.getValue('first_name');
var lastName = user.getValue('last_name');
firstName = firstName.toLowerCase();
lastName = lastName.toLowerCase();
var containsManager = firstName.indexOf('manager') !== -1 || lastName.indexOf('manager') !== -1;
if (containsManager) {
return false;
}
return true;
}