when I Assign to an incident, it display all groups instead of the ones he belongs to only

Jorge17
Tera Contributor

Hello,

I added to the assignment group dictionary active=true under "type specification"  list reference qualifier "advance" reference qualifier field in javascript "active=true" and it works. It only displays the active group on the incident and change request form when selecting the assignment group. Now the problem that I have is, when I assign to "a person name" on the assignment group when searching it displays all the groups instead of the group he is a member of. This is how it was working before I made this update. 

Does anybody know how to fix this?

 

Thank you for listening and assistance 

3 REPLIES 3

Tony Chatfield1
Kilo Patron

Hi, I would start by reversing\rolling back your changes, so that the reference qualifier functionality is restored to previous condition; Then once you have restored the previous reference qualifier, you should be able review the functionality and append 'active=true' to the query that is used to limit available groups to those that match the records assignee.

Amit Gujarathi
Giga Sage
Giga Sage

Hi @Jorge17 ,
I trust you are doing great.

 

Here's a suggested solution:

  1. Navigate to the ServiceNow instance and open the "Dictionary" for the assignment group field.
  2. Locate the "Reference Qualifier" field and edit it.
  3. Modify the existing JavaScript code to include a condition that filters the groups based on the person's membership.
    • You can use the existing condition "active=true" and add an additional condition to filter by the person's membership.
    • Assuming the person's name is stored in the "assigned_to" field, you can modify the code as follows:

 

 

 

javascript: 'active=true^sys_idINjavascript:current.assigned_to.groups.sys_id'

 

  1. Save the changes to the reference qualifier and test the behavior by searching for a person's name in the assignment group field.

 


Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi



HI Amit,

Thank you for your assistance but it didn't work. It still displays all the group when I add my name in the assigned to. I reverted back the change you suggested. 

 

Currently, when I search in assignment group it only display group ending in "Support" (see below).  When I add my name in assign to, it only display the 6 group I belong to.

Jorge17_0-1686662356675.png

 

I am not sure how it displays only the support group. Below is the dictionary. 

Jorge17_1-1686662405727.png

 

What I need is to only display the support group then add "active=true" because I only want group that are in active.  Any idea how to do this?

Thank you for your time and assistance.

Jorge