How to differentiate between attachments uploaded via attachment icon and those uploaded via custom button

Johannes Mweli
Giga Guru

Hi ServiceNow Community Developers,

 I have the following requirement – I need to differentiate between attachments that I uploaded using the attachment icon (paper clip) at the top of the form and the ones I attached using a custom button that I wrote using a UI Macro. In the ones that I uploaded using the custom button I need to put a special flag on them so that I am able to report on them. I think this basically requires a change in the UI Macro that I wrote (please see attached screenshot) however I am not sure how to go about doing that.  Can you please advise if there is a way to accomplish this kind of functionality.

Thanks,

Johannes

1 ACCEPTED SOLUTION

Hi,

you can use field of type File attachment and no macro is required

when you add file from that field type the table name field on sys_attachment starts with ZZ_YYtableName

that you can use report on sys_attachment

find_real_file.png

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

5 REPLIES 5

Glad to help.

Please mark response helpful as well.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader