How to add multiple assignment groups in single Assignment rule using script

Srikanth Cheruk
Kilo Contributor

Hi,

I have created an assignment rule and added one group(A) to Assigned to Group using a script.

if(condition ='true'){

current.assignment_group.setDisplayValue("A");

}

The above code is working fine.

Now I have a requirement where need to add three groups(A, B & C) in the Group field using the script.

Something like this: 

if(condition ='true'){

current.assignment_group.setDisplayValue("A;B;C");

}

is this possible or is there any workaround for this?

1 ACCEPTED SOLUTION

Anil Lande
Kilo Patron

Hi,

Assignment group field is of type Reference and it can hold only one value at a time.

It is not possible to set multiple assignment groups by any way. 

 

Thanks,
Anil Lande

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

View solution in original post

5 REPLIES 5

@Srikanth Cheruku 

Can you explain what's your business requirement here?

If business requires the field to be holding multiple groups then it should be a list field referring to Group table

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader