Is it possible to view the file stored in "sys_attachment" table without downloading it?

Hima Bindu1
Kilo Contributor

Hi,

We are using Report vaccination to collect the employee's vaccination details. As part of this process, they will upload their vaccine card, which will be verified by HR. Is it possible to view the attachment on the platform without downloading it?

Document Viewer plugins are installed and required system properties are set. Still not able to view the file from the sys_attachment table. Am I missing anything? Please suggest.

Thanks,

Bindu

1 ACCEPTED SOLUTION

Maik Skoddow
Tera Patron
Tera Patron

Hi @Hima Bindu 

I think I have a suitable solution for you. Just configure the following UI Action:

find_real_file.png

For better copying the script code:

function openViwer() {
	var sysId = typeof rowSysId == 'undefined' ? gel('sys_uniqueValue').value : rowSysId;
	var url = new GlideURL('sys_attachment.do');
	url.addParam('view', 'true');
	url.addParam('sys_id', sysId);
	g_navigation.open(url.getURL(), '_blank');
}

After that, you will have a new item at the context menu in the list view:

find_real_file.png

Kind regards
Maik

If my answer replied your question please mark appropriate response as correct so that the question will appear as resolved for other users who may have a similar question in the future.

View solution in original post

8 REPLIES 8

Maik Skoddow
Tera Patron
Tera Patron

Hi @Hima Bindu 

have you added the table attribute use_document_viewer for your table:

find_real_file.png

After that you have the additional "view" option for attachments at Incident records:

find_real_file.png

Kind regards
Maik

If my answer replied your question please mark appropriate response as correct so that the question will appear as resolved for other users who may have a similar question in the future.

Harneet Sital
Mega Sage
Mega Sage

I am hoping you have already looked at the below link and have the setup done- 

https://docs.servicenow.com/bundle/paris-platform-user-interface/page/administer/form-administration...

Hima Bindu1
Kilo Contributor

Thank you for the details Maik, I have followed the mentioned steps. Now I can view the file from the Vaccine Responses table without downloading it.

Is it possible to get a similar option to view the file for the records in the sys_attachment table?

 

 

Hi,

I don't think for sys_attachment anything can be done.

Regards
Ankur

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