Database view using list field

Blair5
Tera Guru

I need to join 3 tables in our instance: Application (cmdb_ci_appl), Task (task) and Business Capabilities (cmdb_ci_business_process).

Use case:

An incident is opened for an application. That application has several level 3 capabilities referenced directly in it. The capabilities also reference level 1 and level 2 capabilities.

I'm able to get data back for this if only one application is referenced in the list field on the capability table. However, most capabilities have more than one application referenced. I was hoping I could use 'contains' in the where clause of the database view, but that isn't an option. Does anyone else have any suggestions? Screenshots attached which will hopefully add clarity.

 

find_real_file.png

find_real_file.png

 

 

find_real_file.png

 

7 REPLIES 7

sachin_namjoshi
Kilo Patron
Kilo Patron

Refer this may be it will help you -

 

 

 

ServiceNow Admin 101: Observations on Database Views, Part II

 

Regards,

Sachin

Sachin,

Thank you for providing that link. I'm still not able to figure out how to utilize the contains query. This is how I have it written but I'm getting no data. Could you please assist?

find_real_file.png

Sachin,

Thank you for providing the link but the use case illustrated doesn't help my situation. I want to join on a glide_list field where there can be multiple sys_ids that match. I would like to use 'contains' in the where clause, but I don't believe that is supported. See below for what I'm looking for:

cmdb_sys_id "CONTAINS" bc_u_application

Any other ideas?

You can't use CONTAINS for glide list in database view join condition. This isn't supported yet.

Instead, you can call script include from your database view join condition and pass sys_id to script include.

 

Regards,

Sachin