when the manager is requested the item then approval manager should be skip if not need approval
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
9 hours ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
53m ago - last edited 39m ago
I'm not sure I understand you logic. You are looking at a variable and then getting the variables manager and trying to compare it to the opened by. That would always be no because the opened by could be the manager but if you are trying to compare it to who is listed as there manager. Are you trying to make it so that if the open by is the manager of the person it is being submitted for then you can skip the approval? Also are you using a variable for who the items is requested for?
If that is the case a better way to do it would be to dot walk instead of doing a GlideRecords.
answer = ifScript();
function ifScript() {
var reqForMgr = current.variables.requested_for.manager;
var openedBy = current.request.opened_by;
if (reqForMgr == openedBy) {
return 'yes';
}
return 'no';
}
