Workspace related lists count

George_1
Giga Guru
When I open a record, the related tab “Diagnosis and Recovery Tasks” initially shows a count of 5. However, when I click and open the related list tab, it loads and displays the actual count, which is 149 records.
 
Any suggestions on where to debug this.
 
George_1_1-1780841162877.png

 

George_1_2-1780841169377.png

 


 

1 ACCEPTED SOLUTION

Naveen20
ServiceNow Employee

@George_1 

This is almost always a defined relationship script or a before-query business rule that evaluates differently for the count versus the list.

You may Debug as below

Open the related list definition (right-click the list header > Configure > Related Lists, or check sys_relationship). If "Diagnosis and Recovery Tasks" is a defined relationship, inspect its "Query with" script — the count and list often diverge here.
Check for before-query business rules on the target task table that conditionally add filters.
Enable session debug (SQL/Security) and compare the encoded query fired for the count tab vs. the opened list. Related lists can return the wrong number of records when a query rule or relationship is involved.

View solution in original post

9 REPLIES 9

Tanushree Maiti
Tera Patron

Hi @George_1 

 

In ServiceNow workspaces, related list counts are calculated in the background. The discrepancy between an initial count of 5 and the actual 149 records is typically caused by deferred loading 

for sys_properties: glide.ui.defer_related_lists

default value : false

Description: Load related lists after the form has loaded. This greatly increases the response time of forms.

TanushreeMaiti_0-1780846032095.png

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

Hi @Tanushree Maiti , the property value is false, still it is not loading the exact number when the form loads.

Ankur Bawiskar
Tera Patron

@George_1 

happening for all the users or some users?

how is the behavior for some other related lists which are OOTB?

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar happening for all users, not just for this related list, for few other also I have observed the same when the number of records are high.