Enable a variable in catalog item to download excel template before submitting the request

Sravanthi21
Tera Contributor

I have a requirement: To enable a variable (by clicking on it excel template should be downloaded) for downloading the excel template before submitting the request. Here, we are attaching the excel template on the catalog item form and that template needs to be accessed by clicking on the variable when the end user raises a request by using this catalog item.

2 REPLIES 2

Saurav11
Kilo Patron
Kilo Patron

Hello

 

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.

 

Saurav11_0-1666690183274.png

 

 

 

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

 

Saurav11_3-1666690249488.png

 

 

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>

 

 

Then 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.

 

 

Saurav11_1-1666690183365.png

 

Saurav11_2-1666690183375.png

 

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

 

Saurav11_0-1666690963463.png

 

 

Please mark my answer as correct based on Impact.

Pravallika1
Giga Guru

Hi!!

This perfectly works in native view but it doesnot show the variable on portal. Please help me to show this on portal also.

 

Regards,

Pravallika K