Add hyperlink to form and open excel file on clicking it

Servicenow Use4
Kilo Guru

Hello All,

I have an excel file. I need to have a hyperlink in the form. On clicking that hyperlink, that excel file should be opened. I searched on community and found varying answers related to this but couldn't get a clear idea as to what has to be done....

Can anyone throw some light on

1. how to add hyperlink to a form

2. On its click, open an excel file.... please note.. i just want it to get opened..and not save the file.

 

Many thanks in advance!

 

1 ACCEPTED SOLUTION

Hi,

For point 1 - if you want that file to be shown via URL then you need to store it in ServiceNow i.e. attach to some or other table record.

For point 2 - it depends on the browser configuration whether it is set auto-download or only Open

what type of form you are trying to show to user?

Regards
Ankur

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

View solution in original post

15 REPLIES 15

Hi,

So that record will have a excel file using which user can fill remaining fields

Now the issue is since it would be a new record you cannot attach attachment to it neither you can copy the attachment

Why not have a formatter on your form and show the data of excel on the form for new record if the data from excel will be constant

In that case they can see the data and fill remaining fields

Regards
Ankur

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

Agreed, the excel sheet data is constant. The reason I cannot display the excel sheet data directly on the form is: the sheet has 3 lakhs+ records. 

Hi,

I doubt then this can be working for new record since attachment cannot be added to new record.

Possibly you can create custom table and add that excel to that record

on your existing table you can use formatter and add link there which would open up the attachment.

Then it is upto the user and browser configuration whether they want to auto download or open.

Note: creating custom table may lead to cost implication as per your ServiceNow subscription

Regards
Ankur

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

@Servicenow User 

Let me know if I have answered your question.

If so, please mark appropriate answer as correct & helpful to close the thread.

If not, please let us know if you need some more assistance.

Regards
Ankur

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

Sajilal
Mega Sage

Hi,

To add on,

1) Maybe have a URL Type field on the Form with hyperlink of your excel attachment which i am guessing is point to the Sys Attachment Table

2) On Click of the URL it would either open or download automatically, use Chrome for better experience.

Thanks,

Saji