- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2020 11:27 AM
Hi,
I am trying to pass variable in a URL from a UI Action to a UI Page. The variable is passing to the URL, but when I try to pull it into the UI Page, it is blank.
What am I doing wrong?
We need this because the UI Page opens up in a new window and displays all the attachments of a catalog task ticket. This will allow a print function.
But I need the sys_id of that catalog task to pass to the UI page, when the button is clicked on the catalog task.
This is my code in the HTML of the UI Page.
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<!-- GLIDERECORD in JELLY -->
<g2:evaluate var="jvar_attachments" object="true" jelly="true">
<j:set var="jvar_sysID" value="${RP.getParameterValue('sysparm_rec_id')}"/>
var sysID = jelly.jvar_sysID;
var label = [];
var sysAttachmentGR = new GlideRecord('sys_attachment');
sysAttachmentGR.addQuery('table_sys_id', sysID);
sysAttachmentGR.addQuery('table_name', 'sc_task');
sysAttachmentGR.query();
while(sysAttachmentGR.next()){
label.push(sysAttachmentGR.sys_id.toString());
}
label;
</g2:evaluate>
I have tried so many ways, but it keeps returning blank.
This is the code for the UI Action that passes the variable.
function openPrint() {
var scTask = g_form.getUniqueValue();
var href = "ui_page.do?sys_id=b4b2b5f7db2d1c50346fe&sysparm_rec_id=" + scTask;
window.open(href, "UPS - Print Label(s)");
}
Please, I really need help to get this completed.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2020 01:42 AM
Have attached XML records for a UI Action and a UI Page. The UI Action "Print Labels" on sc_task opens the UI Page to show the images attached to current sc_task record. Follow this procedure to Import the XML records.
Regards,
Rajesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2020 07:09 AM
Oh my goodness. You are the best! It worked. Thank you so much.