- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2022 11:04 PM
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.
Solved! Go to Solution.
- Labels:
-
Cost Management (ITSM)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2022 12:40 AM
Hi,
you can use Rich Text variable and add button to it
1) File added to catalog item
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: <a title="Link" href="/sys_attachment.do?sys_id=29c39e75073f64102011ff208c1ed04f" target="_blank" rel="noopener noreferrer nofollow">Link</a></p>
Output:
Native
Portal
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2022 11:12 PM
Hi,
you can task this approach
1) add excel template to catalog item
2) then use Rich Text variable to add the link
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2022 11:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2022 11:19 PM
Hi Ankur ,
But here i want to create a button on the form to download that attachment instead of link
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2022 11:22 PM
Hi,
then you can add something like this
1) create widget and add button in it and add the URL of the attachment record
2) this would work in portal; add similar logic in UI page which would work in native
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader