how to create a button for downloading excel template

mastanbe
Tera Contributor

Hi All,

I have a requirement like  i want to create a Button for excel file download in the catalog item , how can i do this..

please help me on this requirement.

find_real_file.png

 

1 ACCEPTED SOLUTION

Hi,

you can use Rich Text variable and add button to it

1) File added to catalog item

find_real_file.png

2) Create Rich Text label variable and add source code below

HTML Source Code

<style>
a:link, a:visited {
  background-color: #f44336;
  color: white;
  padding: 14px 25px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
}

a:hover, a:active {
  background-color: red;
}
</style>
<p>Please download the file here:&nbsp;<a title="Link" href="/sys_attachment.do?sys_id=29c39e75073f64102011ff208c1ed04f" target="_blank" rel="noopener noreferrer nofollow">Link</a></p>

find_real_file.png

Output:

Native

find_real_file.png

Portal

find_real_file.png

Regards
Ankur

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

View solution in original post

12 REPLIES 12

Hi Ankur,

I don't know if this is introduced with releases since you wrote this but i am getting multiple points on the page highlighted from the source code not just the link button. See below:

 

JamesRostron_0-1687859457099.png

 

Any ideas?

@James Rostron 

not sure on that part.

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

Yeah don;t worry just thought i'd mention it. I removed the colours and still does exactly what I need it to do so thank you!