Professional Documents
Culture Documents
washington_dc_now_platform_administration_4-5-2024
washington_dc_now_platform_administration_4-5-2024
Washington DC Now
Platform Administration
Last updated: April 5, 2024
Company Headquarters
2225 Lawson Lane
Santa Clara, CA 95054
United States
(408)501-8550
ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the
United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are
associated.
Washington DC Now Platform Administration
Reference qualifiers
Use reference qualifiers to filter the data that is returned for a reference
field.
You can modify the reference qualifier for a table, and any table based
on that table (parent or extended), by defining a reference qualifier
through the Dictionary Entry form. You can also modify the reference
qualifier only on an extended table and its children (not the parent
table), through a dictionary override. You can only define a single
reference qualifier per field, per form/table. Reference qualifiers are
not applicable to condition builders. For information on using filtering in
condition builders, see Create a dynamic filter option.
Note:
• To restrict what data specific users can access, use ACLs not
reference qualifiers.
ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the
United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are
associated.
Washington DC Now Platform Administration
You can define a reference qualifier using one of the following methods.
ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the
United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are
associated.
Washington DC Now Platform Administration
current CI. For example, only CIs that belong to the Computer class are
available in the Model ID field on the Computer form.
ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the
United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are
associated.
Washington DC Now Platform Administration
ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the
United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are
associated.
Washington DC Now Platform Administration
cmdb_rel_ci_child_refQual:function(){
current is a JavaScript object that contains the fields and field values of
the active (current) record. For forms, this is the record that is displayed
(loaded) in the form. Within advanced and dynamic reference qualifiers,
you can use the JavaScript current object to define filters such as
javascript:"company=" + current.company.
This JavaScript, within a reference qualifier, only returns the records from
the referenced table that are equal to the company field value of the
current record. So, if the value that appears in the Company field is
Acme, the JavaScript returns all reference field records whose company
value is equal to Acme (company="Acme"). If you then bring up a
record whose company value is "ViewRite", the JavaScript resolves to
company="ViewRite."
All fields within the currently loaded form (tables) are available for use
with the current object. Use dot-walking to access values in a table,
ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the
United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are
associated.
Washington DC Now Platform Administration
including the referenced table. For example, on the Incident form, the
Assigned To field references the User table. To access the email address
of the user, use the following syntax: javascript:"emailAddress=" +
current.assigned_to.email.
This task walks you through creating a reference qualifier in the system
dictionary. When creating a reference qualifier in the system dictionary, it
not only applies to that table, but also to all the children of the table.
Procedure
ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the
United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are
associated.
Washington DC Now Platform Administration
5. From the Use reference qualifier choice list, select the reference
qualifier to implement.
Field Description
• None
• Clear
• Delete
• Delete no workflow
• Restrict
ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the
United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are
associated.
Washington DC Now Platform Administration
Field Description
8. Click Update.
ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the
United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are
associated.
Washington DC Now Platform Administration
You can also change itil_admin to any other role on a reference field
that refers to the User [sys_user] table.
Procedure
1. Open an incident.
2. In the upper-left corner of the screen, click the form context menu,
and then select Configure > Dictionary.
5. To see the base system business rule that this JavaScript code calls,
navigate to System Definition > Business Rules.
6. Open getRoledUsers.
The business rule uses the following JavaScript code.
// Return an array of sys_ids of the users that have a
t least one role
// optional parameters allow the exclusion (NOT IN) o
f some roles or
// look for specific roles (IN)
//
// optional: queryCondition - 'IN' or 'NOT IN'
// optional: roleList - a comma separated list of rol
e names
//
function getRoledUsers(queryCondition, roleList) {
var roleListIds;
if (queryCondition && roleList) {
roleListIds = getRoleListIds(roleList);
}
ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the
United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are
associated.
Washington DC Now Platform Administration
}
now_GR.query();
while (now_GR.next()) {
users[now_GR.user.toString()] = true;
}
return ids;
}
Procedure
1. Open an incident.
ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the
United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are
associated.
Washington DC Now Platform Administration
4. In the Use reference qualifier field, ensure that the Advanced option
is selected.
8. Click New.
backfillAssignmentGroup:function() {
var assigneeGroupsQualifier = '';
var assignee = current.assigned_to;
grAssigneeGroups.addQuery('user',assig
nee);
grAssigneeGroups.query();
ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the
United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are
associated.
Washington DC Now Platform Administration
while(grAssigneeGroups.next()) {
if (assigneeGroupsQualifier.len
gth == 0) {
// Create the beginnin
g of the qualifier and add the 1st group
assigneeGroupsQualifier
= 'sys_idIN' + grAssigneeGroups.getValue('group');
}
else {
// build a comma separ
ated 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
return assigneeGroupsQualifier;
},
type: 'ReferenceQualifierHelper'
};
What to do next
For example, use the INSTANCEOF operator for a reference field to the
cmdb_ci table to specify that all subclasses of a class are included in the
results. The following reference qualifier returns all servers, including Linux,
ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the
United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are
associated.
Washington DC Now Platform Administration
UNIX, Windows, and so on, because each of those subclasses extend the
cmdb_ci_server class.
sys_class_nameINSTANCEOFcmdb_ci_server
u_active=true^sys_class_name=cmdb_ci_acc
^ORsys_class_name=cmdb_ci_computer
^ORsys_class_name=cmdb_ci_server
^ORsys_class_name=cmdb_ci_win_server
^ORsys_class_name=cmdb_ci_unix_server
^ORsys_class_name=cmdb_ci_linux_server
^ORsys_class_name=cmdb_ci_appl
^ORsys_class_name=cmdb_ci_netgear
u_active=true^sys_class_name=cmdb_ci_acc
^ORsys_class_nameINSTANCEOFcmdb_ci_computer
^ORsys_class_name=cmdb_ci_appl
^ORsys_class_name=cmdb_ci_netgear
ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the
United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are
associated.