- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2016 09:44 AM
Hello,
I have a requirement where I have to create a Field named " Description 1 " such that it should look something like this,
- > Description 1 # (Consider '#' as attachment icon).
So, I want a field so that users could write the description of attachment and attach the file beside the description in a table.
But, There is no field type attachments . I know that there is an icon on top right of each form provided by servicenow, But I want something like this to a field.
Please Help
Thanks in Advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2016 10:02 AM
Hi Santhosh,
You can create a link to add attachment by using *annotations
1. Add annotations to selected slush bucket
2. in the annotation text enter the below code (you can change/remove the styling based on your requirement).
<div id="wrapper" style="color:#000000; line-height: 25%;height:0;text-align:left">
<a id="swamy.attachment" onclick="saveAttachment('incident', '${sys_id}');"><img src="images/icons/attachment.gifx" />Add atatchments here</a>
</div>
Regards,
Swamy

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2016 05:26 AM
Okay, a few questions... I'm assuming that you uploaded or currently have an image uploaded into your instance and named it "paperClip.gifx". If not, then add it:
Okay, now that you've got a paperClip.gifx image to refer to, notice this part of the script:
var attach_el = gel(THIS_FORMS_TABLE + 'u_attach');
and
var att = g_form.getControl('u_attach');
and
var hide = gel('sys_readonly.' + THIS_FORMS_TABLE + 'u_attach');
Notice that they are referring to "u_attach", which is the name of the field on our table. Your's may be different!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2016 09:32 AM
Just an FYI: The Annotation "HTML" option doesn't exist in Eureka or below. Not sure about Fuji. I did check and it's in Geneva though.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2017 01:34 PM
We are on Helsinki version and doesn't seem that we can add the html code to Annotations field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2016 03:30 AM
Hi Guys, I also used this thanks. As this is an annotation, my question is now, can I make this a mandatory?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2016 06:02 AM
Hi Wilson,
May be you can write a onsubmit client script to check if any attachments were added to the record or not.
Thanks and regards,
Swamy