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.
Determining Relates list Query when condition is hidden - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Determining Relates list Query when condition is hidden
KB0859626

Determining Relates list Query when condition is hidden


308 Views Last updated : Jan 3, 2025 public Copy Permalink
KB Summary by Now Assist

Summary

In certain circumstance when clicking "Open Im New Window" on a related list you will receive all record and not the filtered conditions

It is possible to determine how the related list was filtered using the steps within this article

Release

All releases

Instructions

Below is an example of navigating to a license_details related list and determine how the filter is applied for the associated roles related list

This process can be applied to other related lists


Process:

1)enable sql debug (detailed) and open the record you wish to see i.e

There will be multiple SQL records. I'd recommend filtering on the table you know will be used as part of the query. in this example it is "sys_user_role" label: "Role" as we are looking for roles:

SELECT ... FROM ((((( sys_user_role role INNER JOIN sys_metadata role_sys_metadata ON role.`sys_id` = role_sys_metadata.`sys_id` ) INNER JOIN sys_package pkg ON pkg.`sys_id` = role_sys_metadata.`sys_package` ) INNER JOIN ua_app_family fmly ON fmly.`app_id` = pkg.`source` OR (fmly.`scope` != 'global' AND fmly.`scope` = pkg.`source` ) ) INNER JOIN licensable_app lapp ON lapp.`app_family_id` = fmly.`sys_id` ) INNER JOIN license_has_app lhasapp ON lhasapp.`app` = lapp.`sys_id` ) WHERE lhasapp.`license` = '64c2fa214f345b4cc01f41401310c726' ORDER BY fmly.`lineage_name`,role.`name` limit 0,20 /*...*/

2) From the query look at the condition used within the where clause i.e.

WHERE lhasapp.`license` = '64c2fa214f345b4cc01f41401310c726'

This is the query conditions you need to use in filter:

3) The next step is to determine what the lhasapp.license field is from the query condition

From the below part of SQL you can see that lhasapp is an alias for the license_has_app table so the table with the filter condition lhasapp.`license` is license_has_app

"INNER JOIN license_has_app lhasapp


4)If you navigate to sys_dictionary and filter on name is "license_has_app" and element is "license"  you can see the item used for the filter is "Subscription"

5) We have now determined we should filter on the subscription field and can apply this to our filter. The results should now match that of the related list

Filter Subscription is <license detail record>


QUERY:
lhasapp_license=64c2fa214f345b4cc01f41401310c726

https://<instance>/license_details_assoc_roles_list.do?sysparm_query=lhasapp_license%3D64c2fa214f345b4cc01f41401310c726&sysparm_view=

Related Links

This knowledge article is a guideline only. if you have any issues following this process you can always raise a ticket and a support representative may assist you


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.