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

amlanpal
Kilo Sage

Hi Richard,



In the sys_attachment table the 'Table Name' column defined in which table the attachment is attached. Also the 'Table sys ID' shows against which record(the sys_id of the record) the attachment is attached.



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


Thanks, i was wondering if there is a friendly name (rather than sys_id) but i do understand this is a system table.


Hi Richard,



Unfortunately not, there is not friendly name available in the sys_attachment table for the related record. But you can create a new Database view as of below screenshot and generate the Report on the database view itself. To create a new database view navigate System definition-->Database views-->New


find_real_file.png


find_real_file.png



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


Hi RichardSaunders ,



Were you able to have a look at my last response?


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.


If you are viewing this from the community inbox you will not see the correct answer button.   If so, please review How to Mark Answers Correct From Inbox View