- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2018 04:43 AM
Hi,
I need kind help in a script for a workflow IF condition where it will check RITM End user is an member of an particular group then it will be YES and NO in other case. From there I will connect this to next activity for a approval process.
After ordering in catalog form, once RITM is raised then this IF condition should check RITM End user is a part of a group and then the answer is YES or else NO.
Thanks a lot for the help!!!
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2018 04:54 AM
you can use script directly as you use in any other server side scripts:
in the Workflow IF activity try the below code:
var ourUser = gs.getUser().ÂgetUserByID(current.requester);//current.requester - end user in RITM
answer = ifScript();
function ifScript()
{
if(ÂourUser.ÂisMemberOf(group sysid/name))
{
return 'yes';
}
return 'no';
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2018 04:54 AM
you can use script directly as you use in any other server side scripts:
in the Workflow IF activity try the below code:
var ourUser = gs.getUser().ÂgetUserByID(current.requester);//current.requester - end user in RITM
answer = ifScript();
function ifScript()
{
if(ÂourUser.ÂisMemberOf(group sysid/name))
{
return 'yes';
}
return 'no';
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2018 09:46 PM
Thanks lot. It worked great
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2019 03:52 PM
Awesome. Works like a charm. Thanks very much Maniraj!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-05-2020 03:06 AM
Worked perfectly. Thank you