Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

SOW: UI Action 'Assign To Me' how to filter groups?

KevinConsultant
Tera Contributor

Situation:

When creating a new incident via the service operations workspace, using the '+' button.

There is a UI button is called 'Assign to me' which displays a list of all groups of which the current user is a member.

 

Business Need:

We need to be able to filter this list based on Group Type.

 

Question:

Has anyone experienced / attempted to filter the group list to include specific group types. ie. 'itil'

Thanks

11 REPLIES 11

MaxMixali
Kilo Sage

Hello i hope that can help


Situation:
In Service Operations Workspace, when creating a new Incident using the “+” button, the “Assign to me” button shows all Assignment Groups the user belongs to.

Problem:
There is **no out-of-the-box** way to filter that list by *Group Type*.
The Workspace component does NOT inherit the classic form’s reference qualifiers and ignores standard filters applied on the *assignment_group* field.

Business Need:
You want to restrict the list only to groups of a specific type (e.g., “itil”).

Reality:
ServiceNow does **not** provide a built-in configuration for this. Only two technical approaches work.

1) **UI Builder: Modify the Data Resource that feeds the group list**
- Go to **UI Builder → Service Operations Workspace → Experience**
- Open the page/template used by the “+ Create Incident” flow
- Locate the Data Resource that retrieves user groups (usually sys_user_group or a Record Data Resource)
- Add a filter condition:
****
type = itil
****
- OR create a Scripted Data Resource that returns only groups of that type:
**** javascript
var gr = new GlideRecord('sys_user_group');
gr.addQuery('type', 'itil');
gr.addQuery('user', gs.getUserID());
gr.query();
return gr;
****

2) **Override the “now-record-assignment” component**
(This is the method recommended by ServiceNow for custom filtering)
- Clone the UX component
- Modify the **query** or **groupRelationship** property:
****
active=true^type=itil^user=javascript:gs.getUserID()
****
- Publish your custom component and replace the default one in the Workspace.

Important Notes:
- *There is no OOTB solution.*
- *Simply adding a reference qualifier on the Incident form will NOT affect the Workspace behaviour.*
- *Workspace is driven by UI Framework components and Data Resources, not by classic UI rules.*


If you find this answer useful, please mark it as solution accepted/helpful

Massimiliano Micali

 

Thank you Max for the extensive response, please excuse my lack of knowledge 

Option 1 - doesn't seems feasible since the UI Action button doesn't rely on UIB Data Resources

Option 2 - Since it is a UI Action button not a Component i'm not sure an Override will work either.