- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2024 04:18 PM
I have a business requirement to create a report that shows all business applications with a server relationship and vice versa, all servers with a business application relationship.
I'm trying to use CMDB Query Builder - which I haven't used before. It seems simple, but the query result is missing a lot of data and I don't understand why.
This is the query - I did add a filter on the Business Application node to only return business applications that are not retired.
In the results, I filtered on a specific server to test the query and get these results:
Next, I verified the results using cmdb_rel_ci.list for the same server and get the following - which is quite a bit more than the query returns in query builder.
Next, I opened the server record and checked the relationships - which match the list from the cmdb_rel_ci table for the server:
Finally, I verified the missing business applications are not retired and found one business application is retired.
Why does Query Builder return a lot fewer results than it should?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2024 08:36 AM
For anyone who may find this - I didn't click "Load all results". After I clicked this I got all of the data I expected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2024 06:51 AM
Hi @gjz ,
There is a option or filter to see the which relationship type you are looking using the query builder , Please check there all relationship you have selected as well as , check which table you are using that the correct ,also having the relationship with Business application to Server or vice versa as there are no other logic behind that and this is very straight forward.
Also use the Server as Starting Node and business application as second to make the query to generate the reports.
Please appreciate the efforts of community contributors by marking appropriate response as Mark my Answer Helpful or Accept Solution this may help other community users to follow correct solution in future.
Thanks
Ajay Kumar
Linkedin Profile:- https://www.linkedin.com/in/ajay-kumar-66a91385/
ServiceNow Community Rising Star 2024
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2024 08:04 AM
Hi Ajay,
Unfortunately your answer doesn't help. I had already selected all relationships, I know the tables are correct and I had already flipped to the Server as the starting node, but I get the same results - as I should. If you have any more answers, please let me know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2024 08:36 AM
For anyone who may find this - I didn't click "Load all results". After I clicked this I got all of the data I expected.