Dynamic URL on field Label
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2022 01:33 PM
Hello!
I'm looking for some guidance on how to set this up. I want to have a URL on a label that pulls in the value of its field to point to a location. The URL prefix would be "https://<instance>.atlassian.net/browse/" and the suffix would be value of the field; example "SNOW-1234".
Let me know if I can provide any other information & thanks in advance!
Dom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2022 04:41 AM
Hi,
you can just give link and not the label
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2022 05:48 AM
I can, I was just thinking it would look better to use it as hyper-text.
for example:
vs
the second is preferred.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2025 09:35 AM
You found a solution for this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2025 07:49 AM
I haven't - but if anyone has found something I'm all ears.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2025 09:50 AM - edited 10-09-2025 10:21 AM
@NFGDom & @DominikBenner
You should be able to use an HTML field to display the clickable link with your preferred label.
First I would try creating an HTML field and have the value set to be the properly formatted link but I have experienced issues in certain instances with this approach in the past. So generally what I find to work more consistently is to have a blank HTML field that you configure where you want it on the form. Then use an onLoad client script to set the value of the HTML field.
Here is an example of what the client script might look like to populate a blank html field:
function onLoad() {
var urlField = g_form.getValue('jira_url') //replace jira_url with the actual field name in your table.
if (!urlField || urlField.trim() === '') {
g_form.setValue('url_html', 'No Jira Link Available'); //replace url_html with the html field name.
return;
}
var urlLabel = 'Your_Label'; //Set the text you want displayed as the link here.
var htmlContent = ''; //I prefer to set this in the following format for code organization and redability but can just make it a giant string if you want.
htmlContent += '' +
'<div class="JiraURL">' +
'<a href="' + urlField + '">' + urlLabel + '</a>'
'</div>';
g_form.setValue('url_html', htmlContent);
}careful in the code view as it doesn't do a good job of showing the difference between '' (' ' with no space) and ".
Using this approach the HTML field should render the HTML on the form where the field value would normally be displayed. You can use either the div tag or the hyperlink tag to apply any additional formatting.