Need to implement catalog URL Macro with the help of Jelly script

ServiceNow Dev3
Mega Contributor

Hi,

I have requirement in catalog item variable. How to achieve this below task with the help from URL macro. Kindly help us.

Field Name: Computer name

Data Type: Text

Data Requirement: Mandatory

Dependencies:
"Need to put the link in help for this field
https://developer.servicenow.com/sp?id=kb_article&sys_id=6cacf78ddb7a674028f5dbf0ce961978gh"

Thank you.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

You can create UI macro and 1 Widget and link it to Macro type of variable for your catalog item

In that UI macro you can show the link

UI Macro:

HTML:

<?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="https://www.w3schools.com" target="_blank">Visit W3Schools.com!</a>

</j:jelly>

Widget:

HTML:

<div>
<!-- your widget template -->
  <p style="font-size:10px; color:navy;"><a href="https://www.w3schools.com" target="_blank">Visit W3Schools.com!</a>
</p>
</div>

Variable Configuration

find_real_file.png

Output:

Native:

find_real_file.png

Portal:

find_real_file.png

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

7 REPLIES 7

Hi @Ankur Bawiskar 

Can you please let us know how it can be shown in the checkbox.
For example I have checkbox (Click here to refer to the document). Document should be Hyperlink  if click on that it should redirect to a document.

ServiceNow Dev3
Mega Contributor

Thank you Ankur. Its working.

Glad to help.

Please mark appropriate response helpful as well.

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader