How do you store custom metadata for attachments?

roshanrao
Kilo Expert

I find the ServiceNow attachment interface extremely barebones. Has anyone implemented a solution where additional metadata such as Document Type, Description, Tags etc. can be associated with attachments?

4 REPLIES 4

sergiu_panaite
ServiceNow Employee
ServiceNow Employee

Content type and tags are already present on sys_attachment table, see below:



Screen Shot 2016-11-01 at 7.52.58 AM.png


Hi Sergiu,


You are right, tags are in fact available on the attachment table. The issue though is that they are separately managed from a UI standpoint - the attachment UI component on records do not allow for tagging.


Secondly, tags lend themselves to simple values, not necessarily name-value (single or multi) pairs. So they cannot be (easily) used for custom metadata fields.



To step back, what I am trying to do here is provide a simple interface to users where they can upload documents as well as add custom metadata to it.


For example, if you retire an asset, there is a task to attach Certificate of Disposal. As-is, you can take a file and attach it to the asset record. If let's say there are two files in the process, an initial request confirmation from vendor and a CoD, the user would upload the two files. Now either you have to open and see which one is which, or rely on naming (which is constraining), or modify the interface. It also makes systemic rule enforcement difficult.


I was looking for ideas on if/how others have dealt with this problem.



Thanks


javaid
Kilo Contributor

Did you able to get the answer to your query; I am also looking for something similar to dd metadata with attachments.


Javaid,


We ended up creating another table "Document" that has a Document ID field referencing our tables. We only allow attachments on this table.If files are attached to any of the top level tables, we have business rules that create linked Document records with the attachment and users can add metadata to Document.



That is the best we could come up with. I with the sys_attachment table and related SN functionality were richer.



HTH