- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2022 11:57 AM
Hi all,
I am looking to create a flow that automates adding "group type" to a user group that contain a certain word. for example all groups that contain the word "change" will be added Group type "ITIL". Any advice on how to do this with flow designer will be appreciated. Thank you!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2022 01:12 PM - edited 12-27-2022 01:15 PM
Hi,
You can create a onBefore insert a business rule with condition name contain "change" set type as "ITIL".
Thanks and Regards,
Saurabh Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2022 01:54 PM
Hi,
Remove set Action value as itil and check the advance checkbox and write below code
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var curTyArr=[];
var curTy=current.getValue('type');
if(curTy)
curTyArr=curTy.split(",");
curTyArr.push("1cb8ab9bff500200158bffffffffff62");//Type as ITIL
var au=new ArrayUtil();
current.setValue('type',au.unique(curTyArr).join(","));//
})(current, previous);
Thanks and Regards,
Saurabh Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2022 01:54 PM
Hi,
Remove set Action value as itil and check the advance checkbox and write below code
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var curTyArr=[];
var curTy=current.getValue('type');
if(curTy)
curTyArr=curTy.split(",");
curTyArr.push("1cb8ab9bff500200158bffffffffff62");//Type as ITIL
var au=new ArrayUtil();
current.setValue('type',au.unique(curTyArr).join(","));//
})(current, previous);
Thanks and Regards,
Saurabh Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2022 10:53 AM
Thank you so much for your help.