How search works:

  • Punctuation and capital letters are ignored.
  • Special characters like underscores (_) are removed.
  • Known synonyms are applied.
  • The most relevant topics (based on weighting and matching to search terms) are listed first in search results.

Topics are ranked in search results by how closely they match your search terms

  • A match on the entire phrase you typed.
  • A match on part of the phrase you typed.
  • A match on ALL of the terms in the phrase you typed.
  • A match on ANY of the terms in the phrase you typed.

Note: Matches in titles are always highly ranked.

Constrain the assignment group field

  • Save As PDF Selected topic Topic & subtopics All topics in contents
  • Share this page

This example shows how to use an advanced reference qualifier with JavaScript and a script include to restrict the incident Assignment group choices to only the groups that contain the user specified in the Assigned to field.

Before you begin

  • Open an incident.
  • Right-click the Assignment group label and select Configure Dictionary .
  • If the form appears in Default view , under Related Links , click Advanced view .
  • In the Use reference qualifier field, ensure that the Advanced option is selected.
  • In the Reference qual field, enter javascript:new ReferenceQualifierHelper().backfillAssignmentGroup() .
  • Save the record.
  • Navigate to System Definitions > Script Includes .
  • Click New .
  • Name your script includes as ReferenceQualifierHelper to match the Javascript in the following step. This name ensures the API Name is generated correctly, based on the Name field.
  • Script includes with the following JavaScript code. Ensure that the Accessible form field is properly set for the environment. var ReferenceQualifierHelper = Class.create(); ReferenceQualifierHelper.prototype = { backfillAssignmentGroup:function() { var assigneeGroupsQualifier = ''; var assignee = current.assigned_to; //return if the assigned_to value is empty (this causes all groups to be returned) if(!assignee) return; //sys_user_grmember has the user to group relationship var grAssigneeGroups = new GlideRecord('sys_user_grmember'); grAssigneeGroups.addQuery('user',assignee); grAssigneeGroups.query(); while(grAssigneeGroups.next()) { if (assigneeGroupsQualifier.length == 0) { // Create the beginning of the qualifier and add the 1st group assigneeGroupsQualifier = 'sys_idIN' + grAssigneeGroups.getValue('group'); } else { // build a comma separated string of groups if there is more than one assigneeGroupsQualifier += (',' + grAssigneeGroups.group); } } // return Groups where assigned to is in those groups we use IN for lists gs.log('DP: RefQual = ' + assigneeGroupsQualifier); return assigneeGroupsQualifier; }, type: 'ReferenceQualifierHelper' };

What to do next

Last updated: August 3, 2023

Tags: Vancouver , Platform Field Administration

ServiceNow Community servicenow community

developer

  • ServiceNow Community
  • Discussions
  • Developer forum
  • Reference qualifier to limit assignment groups fie...
  • Subscribe to RSS Feed
  • Mark Question as New
  • Mark Question as Read
  • Float this Question for Current User
  • Printer Friendly Page

Reference qualifier to limit assignment groups field

joshuamayes

  • Mark as New
  • Report Inappropriate Content

‎12-07-2016 02:43 PM

Solved! Go to Solution.

  • 2,173 Views

HV1

‎12-07-2016 03:10 PM

View solution in original post

  • All forum topics
  • Previous Question
  • Next Question

Abhinay Erra

‎12-07-2016 02:54 PM

‎12-07-2016 04:31 PM

‎12-07-2016 04:33 PM

  • Limit MRVS reference field by same field on other rows? in Developer forum 6 hours ago
  • Configurable Workspace Reference Fields open Modal but do not load records in Developer forum yesterday
  • How to display only assets that are assigned to the selected user in Record Producer in Developer forum Tuesday
  • Catalog reference variable Drop down value is showing unwanted values in Developer forum Tuesday
  • How to achieve Advanced Work Assignment: Set Agent's Availability automatically after 10minutes in Developer forum Monday

servicenow assignment group reference qualifier

ServiceNerd

ServiceNow Advanced Reference Qualifier | How to filter the Assignment group based on Assigned To

Been in a predicament in ServiceNow, where you know the person a task needs to be assigned to, but don’t know the right group? I got you!

In this video, we add an advanced reference qualifier on a dictionary override on the assignment group fields (for incidents) that calls a server side script include to run some funky glideRecord queries and return as back a refined list of group sys_id’s. Its then these groups that are shown when you click the Assignment Group magnifying glass.

https://docs.servicenow.com/en-US/bundle/tokyo-platform-administration/page/script/server-scripting/concept/c_ReferenceQualifiers.html

https://www.servicenow.com/community/developer-forum/dynamic-advanced-reference-qualifier-examples/m-p/1386576

Reference Qualifier bit:

javascript:new global.AssignmentGroupFilter().refineAssignmentGroup(current.assigned_to)

Script Include:

Tags: advanced reference qualifier beth anglin GlideRecord reference field reference qualifier script include servicenerd servicenow admin servicenow demo servicenow tutorial sysid in

You may also like...

ServiceNow ChatGPT

What is ChatGPT and Can We Use it for ServiceNow

ServiceNow Populate Logged in User

ServiceNow: How to populate user reference field with logged in User. #shorts

servicenow assignment group reference qualifier

ServiceNow Client Script Messages | getMessage | Language Translation

  • Next story Flow Designer Error Handling ServiceNow | How to…
  • Previous story ServiceNow GlideAggregate Count | Is it better than GlideRecord getRowCount()

ServiceNerd_JustinMeadows

All Videos / New Features / Tips & Tricks

AI in ServiceNow with Justin Meadows | What does it mean?

February 27, 2023

New Features / Tips & Tricks

December 18, 2022

  • Recent Posts
  • Popular Posts
  • Recent Comments

servicenow assignment group reference qualifier

All Videos / Flow Designer

“Do the Following Until” Flow Logic in ServiceNow Flow Designer

September 1, 2023

Dynamic Flow

Exploring Dynamic Flow and Get Flow Output Logic in ServiceNow Flow Designer!

July 24, 2023

servicenow assignment group reference qualifier

All Videos / Flow Designer / Tips & Tricks

Flow Designer Error Handling ServiceNow | How to…

July 3, 2023

servicenow assignment group reference qualifier

June 11, 2023

ServiceNow GlideAggregate

ServiceNow GlideAggregate Count | Is it better than GlideRecord getRowCount()

April 24, 2023

ServiceNow Hyperlink

Service Catalog / Tips & Tricks

ServiceNow: How to embed hyperlinks in work notes | clickable links

October 30, 2022

ServiceNow Import Set API

Integrations

ServiceNow Inbound REST API | Import Set API

September 12, 2022

servicenow assignment group reference qualifier

New Features / Shorts

ServiceNow San Diego Polaris | ServiceNow Next Experience UI #SanDiego #Polaris #Shorts

February 7, 2022

ServiceNow Flow Template Builder

Flow Designer

ServiceNow Flow Template Builder | Create a template using Flow Template Builder

October 6, 2022

servicenow assignment group reference qualifier

  • artificial intelligence business rule client script flow Flow designer Flow designer development flow designer for service catalog flow designer servicenow flow designer servicenow orlando flow designer servicenow training flow design tutorial g form glideajax GlideRecord integration hub onload script include service catalog service catalog in servicenow service catalogue servicenerd servicenow servicenow admin servicenow administrator training servicenow community servicenow demo servicenow developer servicenow developer training servicenow flow servicenow flow designer servicenow flow designer approval servicenow flow logic servicenow glideajax example ServiceNow how to servicenow integration servicenow microsoft teams servicenow new features ServiceNow Next Experience ServiceNow Polaris servicenow reference field ServiceNow San Diego servicenow shorts servicenow training servicenow tutorial subflow

IMAGES

  1. Filtered Reference Fields in ServiceNow

    servicenow assignment group reference qualifier

  2. Advanced Reference Qualifier Using a Script Include

    servicenow assignment group reference qualifier

  3. 45 Servicenow Reference Qualifier Javascript Script Include

    servicenow assignment group reference qualifier

  4. ServiceNow Reference Qualifier with real time scenario

    servicenow assignment group reference qualifier

  5. 45 Servicenow Reference Qualifier Javascript Script Include

    servicenow assignment group reference qualifier

  6. #ServiceNow Advanced Reference Qualifier Part- 2| Call Script Include #

    servicenow assignment group reference qualifier

VIDEO

  1. ServiceNow Reference Qualifiers Shorts

  2. Servicenow Scripting part 3

  3. CCPS Assignment group 5

  4. Conditional assignment in #javascript or #servicenow using && and || operators #servicenowdeveloper

  5. Social Groups

  6. How to set Reference Field to Logged in User in ServiceNow? Engineer Vineet Jajodia

COMMENTS

  1. What Is the Difference Between Power and Authority?

    Authority refers to the duties and responsibilities that are assigned to a person in a position of control, while power is the actual physical and direct control of someone over another person or group.

  2. How Does Delta Assign Seats?

    Most Delta customers choose their seats when purchasing a ticket. Basic Economy customers are assigned seats by Delta and receive a seat assignment after check-in. These seat assignments are random, and there is no guarantee that members of...

  3. What Does “sum” Mean in Math?

    In mathematics, adding numbers, items or amounts produces a sum. The word also refers to a group of arithmetic problems given as a classroom assignment. As a verb, to sum is to find the total of added amounts.

  4. Reference Qualifier for assignment group depending...

    Hi Lakshmi,. you are sending assigned_to value as parameter to the function from the ref qualifier but as per the function declaration it doesn't accept any

  5. Constrain the assignment group field

    This example shows how to use an advanced reference qualifier with JavaScript and a script include to restrict the incident Assignment group choices to only

  6. How to add different reference qualifiers for Assignment Group?

    You need to use dictionary override in Assignment Group field. Please go through below link for more details. Dictionary Overrides - ServiceNow Wiki.

  7. Reference qualifier for assignment group on incident table

    Hello guys! Thank you for your fast reply. I am realy gratefull. After all I found this beautiful piece of code, that is working:

  8. Reference Qualifier for Assignement group field in problem table

    In form right click to Assignment Group and select configure dictionary and in related list click on Advance view, go to Reference Specification

  9. Advanced Reference Qualifier for Assigned To

    Advanced Reference Qualifier for Assigned To - Members of one group ... assignment group in your assigned to dictionary. find_real_file.png.

  10. Advanced Reference qualifier on Overridden Assignment group

    Hi,. no need to query; directly use this var ProfileIssue = Class.create(); ProfileIssue.prototype = { initialize: function() { }

  11. How to filter the Assignment group based on Assigned To

    #servicenerd #servicenow #servicenowdeveloper. ServiceNow Advanced Reference Qualifier | How to filter the Assignment group based on Assigned To.

  12. Reference qualifier to limit assignment groups field

    Try this: function u_getGroupsInRole(roleList) { //declare function to be called and expected variable; var groups = [];; var gr = new

  13. Setting Reference Qualifiers with Dictionary Overrides

    A question was asked about how to set different reference qualifiers for the assignment group field across the various task types that

  14. ServiceNow Advanced Reference Qualifier

    I got you! In this video, we add an advanced reference qualifier on a dictionary override on the assignment group fields (for incidents) that