Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
The group by count is not matching the total count of the list view when ddEncodedQuery in a Before query business rule filtering by watchlist - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • The group by count is not matching the total count of the list view when ddEncodedQuery in a Before query business rule filtering by watchlist
KB0717333

The group by count is not matching the total count of the list view when ddEncodedQuery in a Before query business rule filtering by watchlist


2034 Views Last updated : Oct 16, 2023 public Copy Permalink
KB Summary by Now Assist

Description

When there is a before query business rule using a encoded query (ddEncodedQuery) with watch list in it, the count on list views gets messed up when the list is grouped by.

When a list is grouped by, each group will have a count (middle left side of the page). The some of groups count should be equal to the total of the list view count (top right count).
In this issue the some of all groups are not matching the total count of the list.

The total count is right.
The Group by count is wrong because the watchlist information. If the number of users in the watch list changes, the Group by count will change to. For example, if you add a user to the watch list, the Group by count will increase by one.

This is not reproducible on Kingston or Jakarta Patch 9
It is reproducible on Jakarta Patch 5

Steps to Reproduce

Jakarta Patch 5

PART 1
1- Go to the business rule Incident Query:
- nav_to.do?uri=sys_script.do?sys_id=2bc2f9b1c0a801640199f9eb0067326e

2- Substitute the code in the script field under Advanced tab for the following code:

var queryString = "caller_idDYNAMIC90d1921e5f510100a9ad2572f2b477fe^ORwatch_listDYNAMIC90d1921e5f510100a9ad2572f2b477fe";
if (!gs.hasRole("admin") && gs.isInteractive()) {
var u = gs.getUserID();
var qc = current.addEncodedQuery(queryString);
}

PART 2
3- Upload the XML file, attached to this PRB, into the instance (attachment name: active=true^caller_id=681b365ec0a80164000fb0b05854a0cd)_OOB_ITILusers tickets.xml)
(NOTE: this XML file consist of incidents INC0000059, INC0000058, INC0000057.
-I have made Caller = ITIL User for these incidents
- I added Abel Tudor user to INC0000059's watch list
- I added ITIL User, Fred Luddy, Fred Kunde to INC0000057's watch list.
OR
Manually make the changes referred above.

PART 3
Seen the issue:
4- Impersonate ITIL User
5- Go to Incident > All
6- Right click on top of the column header Assignment Group and select the option Group By Assignment Group.
7- Assignment Group count (5) does not match, list total count (3). See image

Unexpected behavior
- Step 7

Expected behavior
- Step 7 should be: Assignment Group count (3), list total count (3)

Workaround

After carefully considering the severity and frequency of the issue, and risk of attempting a fix, it has been decided to not address this issue in any current or future releases. We do not make this decision lightly, and we apologize for any inconvenience. If you have any questions regarding this problem, contact ServiceNow Customer Support.


Related Problem: PRB1283850

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.