Need to enable hyperlink in Variable Under Catalog item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi Team,
I have enabled this msg by writing below script in Catalog UI policy. But I want to add hyperlink so that user can click that link and can be routed to the Onboarding form. Which module i can use to enable this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago - last edited an hour ago
Hi @vidyajadhav
You can try with Rich Text Label variable / URL type variable to show the link the message based on selected variable value.
A community member has achieved it using DOM - It is not recommended. Refer: https://www.servicenow.com/community/developer-forum/how-to-show-url-link-in-field-message-when-opti...
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hello @Tanushree Maiti ,
Unfortunately that gel method will not work in service portal ui , it will work on native ui(desktop) only 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
field messages don't support HTML Links etc
Couple of approaches
1) Either create URL type variable with default value and show/hide it based on your condition
OR
2) Create Rich Text Label variable and add link in it, then show/hide that variable based on your condition
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
34m ago
Hi @vidyajadhav,
I was able to achieve this requirement using a Rich Text Label
Steps :
- Created a Rich Text Label variable in the Catalog Item.
- Added the informational message and hyperlink using HTML in the Rich Text editor (Source Code view).
- Styled the message using a <div> with background color, padding, and border to match the required UI.
- Used a Catalog UI Policy to show/hide the Rich Text Label based on the selected value in the Role/Option variable.
<div style="background: #d9edf7; border: 1px solid #bce8f1; padding: 10px; border-radius: 4px;">Choose the appropriate Project Business Role. <br><br>If you are not sure, please check with the Project Lead. <br><br>Raise a separate request to complete the Business Role onboarding <a href="/sp?id=sc_cat_item" target="_blank" rel="noopener noreferrer nofollow"> here </a> if you cannot find your team's business role on the list.</div>
After testing in both Native UI and Service Portal, the hyperlink is displayed correctly and is clickable.