How to Copy One image(Field 1) to another image(Field 2) both fields are of Image type
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-14-2016 06:14 AM
HI Everyone,
I have a requirement where I have to copy one image field value to another field as follows:
-- I have inserted image in "db_image" table this image stored in image field(FIELD 1) in that record.
-- I have another image type field FIELD2 in catalog task table
So I want to display image of FIELD1 to FIELD2.
Thanks,
Alekhya N
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2018 10:06 PM
Hi Chuck.
One question. What would be the criteria to trigger a BR when a picture field changes on a given table since what is actually happening is a that a record gets created in the sys_attachment table?
I tried using the condition builder and adding a "When Picture Changes" filter but did not seem to do the trick.
Thanks
Miguel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2018 10:37 PM
H,
As Chuck explained, Image fields store their content as attachments. You'll need to use the standard attachment copy method to attach it to the right record and field.
When you upload an image to a field 1 then it stores in the sys_attachment table where file name would be the database column name of the field 1.
You can simply use the copy attachment functionality and then update the file name with the field 2 on the copied record.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2018 07:35 AM
Thanks for the quick reply Rahu. I am afraid that really does not answer my question.
I understand that in order to copy an image from one field to another table field, you will use the GlideSysAttachment.copy() method and that creates the new record in attachments table. Meaning my image gets copied from the source table field to the target table field.
What I am really asking is how to actually "trigger" the action to copy the image to the target table. I have created an "After Update Business Rule" that fires whenever the Picture gets added to the field, but that does not seem to work. I assume it is because the value in the Picture field never changes since everything is happening in the Attachments table.
I do not want to create a After Insert BR on the Attachments table.
Any thoughts?
Miguel

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2019 06:19 AM
I managed to do it this way:
located the image on the sys attachment table by searching by file name=icon (as recommended above by Rahul) then table sys id= <the sys id of the record producer>. Clicked into it which auto-downloaded the image, renamed the file extension to .png and was then able to upload it to my new record producer. Et voila!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2020 10:49 AM
Please refer this link:
https://hi.service-now.com/kb_view.do?sysparm_article=KB0720062