Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Amending an Image field via flow

StewartFletcher
Tera Guru

We have a requirement to be able to set an image field on a table to a certain image, which is to be done via a workflow.

 

We're struggling to figure out how to actually get it to set the image. We've uploaded an image to the Images (db_image) table and are trying to get that to populate the 'Logo' field on the Service Portal. However, we've tried the file name, sys_id, image source string etc but nothing seems to populate it.

 

Any ideas?

1 ACCEPTED SOLUTION

Raghav Sharma24
Giga Patron

so this is how it works:

1. You need to make an insert in sys_attachment table with table_name="ZZ_YYsp_portal" and table_sys_id="your portal record sys_id".

2. Now update the sys_id of attachment created in in step1 to the logo field of your portal record.

 

I dont think this will work from db_image table.


Please mark the answer correct/helpful accordingly.

View solution in original post

3 REPLIES 3

Raghav Sharma24
Giga Patron

so this is how it works:

1. You need to make an insert in sys_attachment table with table_name="ZZ_YYsp_portal" and table_sys_id="your portal record sys_id".

2. Now update the sys_id of attachment created in in step1 to the logo field of your portal record.

 

I dont think this will work from db_image table.


Please mark the answer correct/helpful accordingly.

As simple as that huh? Thank you!

@StewartFletcher great it worked for you! When I handled similar requirement, I too explored db_image table first. It happens 😄