The CreatorCon Call for Content is officially open! Get started here.

Help Creating a Database view

Alex319
Giga Guru

Hi All, 
I'm trying to create a database view to link a custom cmdb table and the case table. 
When I add the cmdb table to the database view and click on 'try me' the table shows no records. 
The purpose of this database view is to create a report which can look at an asset and see if there are any cases related to that asset. 

Alex319_0-1706538315320.png

Alex319_1-1706538410557.png

Any help would be greatly appreciated

 

Thanks

Alex

 

1 ACCEPTED SOLUTION

Siddhesh Wani1
Tera Guru

Hi Alex 

The where clause doesn't support the dot walking. You have to think about the correct condition 

Something unique on the both table and write the query like below

SiddheshWani1_0-1706539662966.png

here com is company and checking the user's company and give the correct data. 

Both field should are referring to the same sys_id.

 

View solution in original post

18 REPLIES 18

It's not that I want to see specific assets. I was just expecting more than 7 records to show up. I thought there would be a record for each case that had been created. 

Thanks

Alex

Siddhesh Wani1
Tera Guru

Then you have to play with the conditions, you will get one condition that will work.

Hi, 

Do you mean the Where clause conditions? 
Thanks
Alex

Yes, You have to check which where clause condition is perfect for the result or otherwise go with my solution of link all the three tables and for the asset table you can add other asset sys_id using or condition 
as_sys_id = '005b1c08471e3d94fa51e929736d439f' || as_sys_id = '***************' || .............