
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2018 09:25 PM
Hi,
I want to display Hyperlink within the catalog item variable in serviceportal.
Ex: <a href="https://www.google.com">Click Here</a>
In serviceportal i want to display Click Here as hyperlink in the catalog item.How can i achieve this.
Regards
Sai krishna
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2018 01:46 AM
Hi Sai Krishna,
This is possible by setting the "glide.ui.escape_text" system property to false. Once you make this property false, you can use a label type variable and write your a href tag in the Help Text section .
<a href="https://www.google.com">More information</a>
But this is not advisable since it opens the instance to cross site scripting attacks. Please find below link for your reference
https://community.servicenow.com/community?id=community_question&sys_id=f00fcba1dbdcdbc01dcaf3231f9619f4
The safest way is to create a UI macro for this purpose and this also ensures it is compatible to your service portal widget.
Thank you.
Regards,
Mrudula M
Please hit Correct/helpful depending on impact of response.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2018 10:01 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2018 10:12 PM
Have you checked the variable types? There is a URL type variable that you can try to use.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2018 10:20 PM
Hi Sai Krishna,
You can create a UI macro and embed it in your catalog.Please find below test UI macro which I created. Also, I created a new variable in the catalog of Type : macro and referenced my UI macro to this variable.
Test 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">
Click <a href='https://www.google.com' target='_blank'>here</a>
</j:jelly>
Let me know how that works for you.
Thanks,
Mrudula
Please hit Correct/helpful depending on impact of response.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2018 10:23 PM
But i want to do it without using Macro variable. Can this will be possible using Label Variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2018 01:46 AM
Hi Sai Krishna,
This is possible by setting the "glide.ui.escape_text" system property to false. Once you make this property false, you can use a label type variable and write your a href tag in the Help Text section .
<a href="https://www.google.com">More information</a>
But this is not advisable since it opens the instance to cross site scripting attacks. Please find below link for your reference
https://community.servicenow.com/community?id=community_question&sys_id=f00fcba1dbdcdbc01dcaf3231f9619f4
The safest way is to create a UI macro for this purpose and this also ensures it is compatible to your service portal widget.
Thank you.
Regards,
Mrudula M
Please hit Correct/helpful depending on impact of response.