how to get excel download link in the service portal form in servicenow based on the category

Community Alums
Not applicable

Hi,

I need help regarding the below scenario. Can anyone please help me? 

In the portal when we are filling out a form for the request by selecting the particular service category (as shown in the attached picture ) the Excel sheet should be populated automatically and it should be downloadable when we click on the Excel link below the phone number variable. So that the end user can easily download and fill the details then the user should attach and submit the request.

 

Thanks in advance!!

 

1 ACCEPTED SOLUTION

Hemanth M1
Giga Sage
Giga Sage

Hi @Community Alums ,

 

Follow this simple steps 

1)Create a variable type custom

2)Attach your Excel attchemnt to this variable

HemanthM1_0-1696663303067.png

 

 

3)get a URL of the attachment by going into the attachment table 

4)Create a Service Portal widegt as below:

HemanthM1_1-1696663357020.png

 

5)Add this widget to the variable you created in the step 1:

HemanthM1_2-1696663416225.png

 

6)Add UI policy to show this variable according to the requirement as it will show as below , it clickable link, upon clicking it downloads the Excel

HemanthM1_3-1696663494512.png

 

Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

View solution in original post

4 REPLIES 4

Hemanth M1
Giga Sage
Giga Sage

Hi @Community Alums ,

 

Follow this simple steps 

1)Create a variable type custom

2)Attach your Excel attchemnt to this variable

HemanthM1_0-1696663303067.png

 

 

3)get a URL of the attachment by going into the attachment table 

4)Create a Service Portal widegt as below:

HemanthM1_1-1696663357020.png

 

5)Add this widget to the variable you created in the step 1:

HemanthM1_2-1696663416225.png

 

6)Add UI policy to show this variable according to the requirement as it will show as below , it clickable link, upon clicking it downloads the Excel

HemanthM1_3-1696663494512.png

 

Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

Community Alums
Not applicable

Hi @Hemanth M1 

Thank you for your prompt response.

I have followed the above steps as it is. The functionality is working as we expected except for one thing.

i.e. When I am trying to raise a sample test request and click on the Excel download link it hits a dialog box "leave/change" as shown in the below figure. When I click leave, the Attachment will be downloaded.

In the attached picture the "XL Attachment" is our customized variable for Excel download link. When I am clicking on that " XL Attachment " getting the highlighted dialogue box and after clicking on the "leave " in the dialogue box then  downloaded the attachment.

Can you please suggest me how to avoid that dialog box.

Thanks in advance!!

 

Thanks,

Manusha B

 

Community Alums
Not applicable

Hi @Hemanth M1 

Thank you for your prompt response!!

I have followed the above-mentioned steps as it is. The functionality is working as we expected except for one thing.

i.e. When I am trying to raise a sample test request and clicking on the Excel download link (XL Attachment) as shown in below picture, it is hitting a dialogue box "leave/cancel". After clicking on the leave button only it will be downloaded the attachment otherwise it won't download the attachment.

Could you please suggest me how to avoid that dialogue box. 

Thanks in advance!

 

Thanks,

Manusha B

Community Alums
Not applicable

Hi @Hemanth M1 

In the 2nd picture add the bit HTML code to avoid the "Leave/Cancel" dialogue box.

 

Thanks,

Manusha B