Assignment group setting using assignment rule for particular group
						
					
					
				
			
		
	
			
	
	
	
	
	
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
08-24-2023 08:16 AM
Hi Everyone,
I have one requirement to set assignment group for non ac group based on the variable value entered in the catalog item using assignment rule.
for example:
Variable name : assign to this group in catalog item.
I need to create assignment rule :if non 'abc' group then assign to bcd assignment group.otherwise assign to based on the variable value.
Please anyone have idea on this?
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
08-24-2023 08:29 AM
steps to create Assignment rule
- Create a new assignment rule.
 - Define the conditions under which this rule should be triggered. This is where you'll specify that if the group is not "abc", then follow the defined logic.
 - Define the actions that should be taken when the rule is triggered. In this case, it's assigning to the "bcd" group or another group based on the variable value.
 - Save the assignment rule.
 - https://youtu.be/R3bnjx3CoUs?si=o_KMLnZ4A1sBzOGP
 
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
08-24-2023 08:37 AM
Hi Harish,
Thanks for this.
Can you please suggest  can we check a user is a member of particular group in assignment rule script? The user value is get from variables.
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
08-24-2023 08:58 AM
Hello @Neeraja2 ,
Use below script in the script ;
var user = current.variables.<your field name to get user>;
if (user.isMemberOf('name or sys_id of group')){
current.assignment_group= 'sys_id of group';
}
else{
current.assignment_group= 'sys_id of group';
}
Best Regards,
Nayan Dhamane
ServiceNow Community Rising Star 2023.
