save URL as Hyperlink in a Variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2024 04:12 AM
i have variable of type URL in which we are putting urls like 'www.google.com' we want to convert that URL in hyperlink in native UI and workspace so that if someone clicks on it it would open in new tab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2024 06:26 PM
Hey @GD11
If there is any URL with starts with "www." it will append with your instance URL.
So, try something like below in UI policy with out any condition in it:
function onCondition() {
var url = g_form.getValue('url'); // Get the value of the URL variable
if (url) {
g_form.setValue('url', 'https://' + url);
}
}
Hope it works:)
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2024 09:31 PM
Hi @GD11
Suppose I have configured a URL field on the Incident table as shown below :
Now on the native UI, if I provide a URL to the field, it will create a hyperlink to that which will open in new tab as shown below. Note that it can only take a single URL per field.
In Service Operations Workspace as well, it creates a hyperlink which opens in new tab.
Thanks and Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.