- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2022 03:48 AM
i have a catalog item for that i need to check if the requested for person is manager of any group or not according to that i will configure approvals.
How i can check if the requested for is a manager or not?
Regards,
Debasis
@Ankur Bawiskar can you suggest me here
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2022 04:40 AM
Flow trigger would be Service Catalog. Then use Look Up Record action and configure it something like below.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2022 08:02 AM
Check/True the check box Don't fail on error.
Look Up Record action | Docs Link
Or use Look Up Records action.
When a Lookup Record can't find any records the flow results in an error | KB Article Link
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2022 04:40 AM
Flow trigger would be Service Catalog. Then use Look Up Record action and configure it something like below.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2022 07:21 AM
Hi,
i have used it it works fine i have the requirement like if the requested for is a manger then only one level of approval is required else 2 levels of approvals.
Now if the user is a manger then it works fine but if the user is not a manager of any group then the look up record is throwing error and my below flow activities are not at all running
what should be done?
Regards,
Debasis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2022 08:02 AM
Check/True the check box Don't fail on error.
Look Up Record action | Docs Link
Or use Look Up Records action.
When a Lookup Record can't find any records the flow results in an error | KB Article Link
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2022 06:38 AM
if you are using workflow then use IF activity with script
answer = ifScript();
function ifScript(){
var manager = current.requested_for.manager;
var gr = new GlideRecord("sys_user_group");
gr.addQuery("manager", manager);
gr.setLimit(1);
gr.query();
if (gr.hasNext())
return 'yes';
else
return 'no';
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader