- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2022 09:03 PM
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2022 09:40 PM
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
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2022 09:08 PM
Hi,
you cannot differentiate unless you have some custom field on sys_attachment table
I doubt you can achieve this
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2022 09:17 PM
Hi Ankur,
Thanks for your response.
If i add a custom field on the sys_attachment table will that help to achieve the functionality I am looking for.
Also I just noticed a field type called File attachment, I wonder if that can help somehow. I am busy trying it now.
Thanks,
Johannes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2022 09:40 PM
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
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2022 09:38 PM
Thanks Ankur,
Yes, by using field type of File Attachment I got the desired functionality I was looking for.