- 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 11:59 AM
Hi,
Is it a one time job, where are going to save this kind of relation (eg all groups that contain the word "change" will be added Group type "ITIL".)
Thanks and Regards,
Saurabh Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2022 01:09 PM
it's a continuous job for whenever a new group is created with name containing the word "change"
- 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:40 PM
Thank you. This is working. is there a way to make so if the groups are created with a different type to add "itil" type instead of replacing all the group types. Some of the groups have multiple types. for example if the new group containing "change" is created with group type "approval" but we need to also add group type "itil". This business rule will eliminate "approval" type and replace with ITIL group type.