- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2014 08:29 AM
Hi,
I wonder if someone has done that before. In a workflow for a request item, verify if the person that opened the request is member of two specify groups.
here is what I have so far, and error that I got in the Flow
//Verify if the user that opened the request is member of a certain groups
answer = ifScript();
function ifScript() {
if (current.opened_by.isMemberOf('GROUP1') || current.opened_by.isMemberOf('GROUP2')) {
return 'yes';
}
return 'no';
}
Solved! Go to Solution.
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2014 08:40 AM
Hi Julia,
Can you try below script:
//Verify if the user that opened the request is member of a certain groups
answer = ifScript();
function ifScript() {
var ourUser = gs.getUser();
ourUser = ourUser.getUserByID(current.opened_by);
if (ourUser.isMemberOf('GROUP1') || ourUser.isMemberOf('GROUP2')) {
return 'yes';
}
return 'no';
}
Please mark answer as correct/helpful, if it was really helpful
Regards,
Solutioner
Enhance Knowledge NOW@ www.solutioningnow.com
http://www.solutioningnow.com/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2014 08:40 AM
Hi Julia,
Can you try below script:
//Verify if the user that opened the request is member of a certain groups
answer = ifScript();
function ifScript() {
var ourUser = gs.getUser();
ourUser = ourUser.getUserByID(current.opened_by);
if (ourUser.isMemberOf('GROUP1') || ourUser.isMemberOf('GROUP2')) {
return 'yes';
}
return 'no';
}
Please mark answer as correct/helpful, if it was really helpful
Regards,
Solutioner
Enhance Knowledge NOW@ www.solutioningnow.com
http://www.solutioningnow.com/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2014 08:50 AM
Wah! Thanks I was not missing much. It works
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2014 09:01 AM
I'm glad that it worked for you.
Can you please mark my answer as correct?
Regards,
Solutioner
Enhance Knowledge NOW@ www.solutioningnow.com
http://www.solutioningnow.com/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2014 10:12 AM
solutioner now I really wish I can but for some reason I do not see the "Mark Answer" that usually arrears on a discussion...
I'm so sorry....