Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Assignment group setting using assignment rule for particular group

Neeraja2
Tera Contributor

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?

 

3 REPLIES 3

Harish Bainsla
Kilo Patron
Kilo Patron

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
  •  

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.

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';

}

If my answer solved your issue, please mark my answer as Correct & Helpful based on the Impact

Best Regards,
Nayan Dhamane
ServiceNow Community Rising Star 2023.