
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-08-2016 07:41 PM
We currently have a record producer that creates new incidents based up values selected. What our business would like to do is have a message pop up when a certain value is being selected. In this message they want a link to the external site where this type of incident will be handled.
Any ideas on how I can get a web link embedded in the message?
I tried to adding an HTML field on the page and used catalog UI policies to show the field when the value is selected. But for some reason the html link option in the variable isn't showing up. I'm sure people have other ways of accomplishing this.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-08-2016 09:11 PM
Create macro and put your hyperlink there. Then create a variable of macro type and use that macro in there. Then you could create an onChange client script and put this script in there to hide/show variable
g_form.setDisplay('variable_name',false);
Sample UI macro code:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<a href="http://www.w3schools.com">Visit W3Schools.com!</a>
</j:jelly>

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-08-2016 08:54 PM
You can do this with GlideDialogWindow. This allows you to use a Client Script to call a UI Page as a popup. You can pass parameters to the UI page to generate dynamic content.
GlideDialogWindow API Reference - ServiceNow Wiki
Client Script:
var gdw = new GlideDialogWindow('ui_page');
gdw.setTitle('my_title');
gdw.setSize(750,300); // w, h
gdw.setPreference('parm1', 'value1');
gdw.setPreference('parm2', 'value2');
gdw.render();
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">
<g:evaluate>
var value1 = String(RP.getParameterValue('sysparm_parm1'));
var value2 = String(RP.getParameterValue('sysparm_parm2'));
</g:evaluate>
<p>value1: ${value1}</p>
<p>value2: ${value2}</p>
</j:jelly>

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-08-2016 09:11 PM
Create macro and put your hyperlink there. Then create a variable of macro type and use that macro in there. Then you could create an onChange client script and put this script in there to hide/show variable
g_form.setDisplay('variable_name',false);
Sample UI macro code:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<a href="http://www.w3schools.com">Visit W3Schools.com!</a>
</j:jelly>