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

When reporting on the sys_attachment table how can i tell which record it is attached to?

RichardSaunders
Tera Guru

When reporting on the sys_attachment table how can i tell which record it is attached to?

I have a filter condition: table is cmdb_ci_service

But with the available column fields I can only get 'File Name' this is of any use, none of which tell me which service they are attached to.

Any help on this please?

13 REPLIES 13

Hi Richard,



Please select 'Left Join' column value as 'false' for both 'sys_attachment' and 'cmdb_ci_service' under 'View Tables' related list. Once you are done with changing, please try again.



I hope this helps.Please mark correct/helpful based on impact


Still no luck i am afraid



find_real_file.png


chirag_bagdai
ServiceNow Employee
ServiceNow Employee

Hi Richard,



sys_attachment table is used for all tables (generic table) so if you want CMDB CI service name then you can export "Table Sys ID" column data from sys_attachment table and then query "CMDB CI Service" table with "sys_id" is one of.



or I am not sure but you can try database view if that works for you.


Suseela Peddise
Kilo Sage

Hi Richard,



Please use the 'Table sys ID' field to know the sys_id of the record where the attachment is actually attached to.



Hope this might be helpful.



If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.