How to add a hyperlink to a select box variable name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 01:28 AM
So far I can only add the hyperlinked word in the help text, but the requirement is to have the hyperlink in the actual question/variable, which is a select box.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 02:52 AM
Hello @aimughal ,
Using UI macro you can achieve this.
1) Navigate to All > System UI > UI macros > new .
2) All following code in the UI macros (just an example. modify code as per your requirement).
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<label class="col-xs-12 control-label"><a href="https://www.servicenow.com/community/virtual-agent-forum/how-to-add-a-hyperlink-to-a-select-box-variable-name/td-p/2968405">Category</a></label>
<div class="col-xs-6">
<select class="form-control cat_item_option">
<option value="software">Software</option>
<option value="hardware">Hardware</option>
</select>
</div>
</j:jelly>
3) Create variable. Choose type Custom.
4) In Type Specification tab, in macro field choose created macro.
It's looks like this in the form:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2024 11:16 PM
@Unique45 I used your code, and it works fine at the catalog form level when I click on 'Try It,' but at the portal level, the variable is not showing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2024 10:11 PM
Hi @Unique45 , is it possible to make the choices of a multiple-choice variable into hyperlinks, or at least make the variable itself a hyperlink?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2024 07:04 AM
Hello @mrreddy534 ,
In my opinion, it is not possible to make the choices of a multiple-choice variable into hyperlinks, but you can make the variable label a hyperlink