How to add the Link for download the excel file in service catalog item form

Tharun15
Tera Contributor

Hi Team 

How to add the document links for user information if we click on below link get down load the excel sheets in catalog item form. how to configure this 
please find the below 

 find_real_file.png


thanks,

Kumar T

1 ACCEPTED SOLUTION

Shubham Sanjay
Kilo Expert

 

This can be done as per the steps mentioned below:

 

1) First of All Upload the Attachment file which should get downloaded on click of the Variable to the Catalog item which contains that Variable.

 

find_real_file.png 

 

2) Create a UI macro as per the below script:

 

Script:

<?xml version="1.0" encoding="utf-8" ?>

 

<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">

 

<p><a href="/sys_attachment.do?sys_id=ca72962870e8960020d27bce9ea54623" title="Click Here to Download the Attachment">Click Here to Download the Attachment</a></p>

 

</j:jelly>

 

Navigate to sys_attachment Table and copy the Sys_id for the latest file uploaded as per Step 1 and replace the same in the UI macro script shared above.

 

 

find_real_file.png

 

 

 

find_real_file.png

3) Once the Macro has been created, create a Variable with Type as "Macro" and attach the macro created above in the Type Specification tab of the Variable.

 

 Have tested this on my Personal instance and it worked. Kindly test the same from your end also.

 

Hope this helps.Mark the answer as correct/helpful based on impact.

 

Regards,

Shubham Sanjay Gupta.

View solution in original post

10 REPLIES 10

Mark Roethof
Tera Patron
Tera Patron

Hi there,

Not sure if this is what you mean. If not please clarify a bit more.

1) Add your attachment to the Catalog Item

find_real_file.png

2) On the insert link in the description, change the type to Attachment and select the attachment.

find_real_file.png

Obviously, if you have the attachment online, internal URL etc, you could just reference to this.

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Thank you, @Mark Roethof !! Your solution was nice and simple to follow! 🙂

Shubham Sanjay
Kilo Expert

 

This can be done as per the steps mentioned below:

 

1) First of All Upload the Attachment file which should get downloaded on click of the Variable to the Catalog item which contains that Variable.

 

find_real_file.png 

 

2) Create a UI macro as per the below script:

 

Script:

<?xml version="1.0" encoding="utf-8" ?>

 

<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">

 

<p><a href="/sys_attachment.do?sys_id=ca72962870e8960020d27bce9ea54623" title="Click Here to Download the Attachment">Click Here to Download the Attachment</a></p>

 

</j:jelly>

 

Navigate to sys_attachment Table and copy the Sys_id for the latest file uploaded as per Step 1 and replace the same in the UI macro script shared above.

 

 

find_real_file.png

 

 

 

find_real_file.png

3) Once the Macro has been created, create a Variable with Type as "Macro" and attach the macro created above in the Type Specification tab of the Variable.

 

 Have tested this on my Personal instance and it worked. Kindly test the same from your end also.

 

Hope this helps.Mark the answer as correct/helpful based on impact.

 

Regards,

Shubham Sanjay Gupta.

Hi Sanjay G,

 

Thanks for your answer.

 

but i have created macro but attachment not showing as (

Requested attachment does not exist)

after click on download link

please find the below 

find_real_file.png

screen 2

 

find_real_file.png

Thanks 

Kumar