- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2019 11:45 PM
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
thanks,
Kumar T
Solved! Go to Solution.
- Labels:
-
Facilities Service Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2019 12:13 AM
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.
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.
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2019 02:27 AM
Hi,
Go to sys_attachment.list and filter by that sys_id and check if there is attachment or not. May be the sys_id that you are passing is wrong.
Mark the comment as a correct answer and helpful if this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 06:19 PM
Hello Shubham,
I am facing a situation where i am having a catalog item in which i have multiple excel files attached to it. Depending upon the selection of variable value, the attachment needs to be downloaded.
But when i click on the UI macro link, it is redirecting me to the same catalog item form.
Here is the UI Macro:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<div style="background-color: gray;margin-left: -8px;padding-top: 2px;padding-bottom: 2px;background-color: gray;text-align: center;font-weight: 700;"><span style="color:white">Please download the SR template and attach the updated template,</span> <a href="" id="srMacro" target ="_blank" style="color: blue;">Click Here</a> <span style="color:white"> to download.</span></div>
</j:jelly>
Client script:
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var sr_offer = g_form.getValue('sr_offerings');
var URL = "/sys_attachment.do?sys_id=";
if (sr_offer == 'users' && newValue == 'new_users') {
URL = URL + "a1e79d311bfc6950df41a79ce54bcb2a";
} else if (sr_offer == 'users' && newValue == 'update_users') {
URL = URL + "35e79d311bfc6950df41a79ce54bcb6c";
} else if (sr_offer == 'users' && newValue == 'add_users_to_existing_groups') {
URL = URL + "69e79d311bfc6950df41a79ce54bcb27";
} else if (sr_offer == 'users' && newValue == 'user_role_delegation') {
URL = URL + "f27646db1b30e190df41a79ce54bcb48";
} else if (sr_offer == 'users' && newValue == 'inactivate_users') {
URL = URL + "657d51311b30a950df41a79ce54bcb50";
} document.getElementById('srMacro').href = URL;
}
Can you please help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 10:35 PM
Have you got solution for this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2019 10:19 PM
Thank You Got it
Regards,
Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2021 06:50 AM
Can someone help me with ATF steps on how to download attachment and upload it again