Make the url a wrapped short link in URL type field in servicenow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2024 10:45 PM
Hi team,
I need some help in shortening the url mentioned under URL type field.
I have a URL type field and under calculated section with calculation type as script and created the dynamic url. I have given the script something as below:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2024 10:58 PM
Hi @Shubham Deep ,
var u_test = g_form.getValue('u_number');
var url = 'https://myinstance.service-now.com/u_cmdb_abcd_list.do?sysparm_query=query1.u_app_id%3D' + u_test + '&sysparm_first_row=1&sysparm_view=';
var linkText = 'Link';
return '<a href="' + url + '" target="_blank">' + linkText + '</a>';
Thanks
Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2024 12:26 AM
Thanks @Arun_Manoj for the reply, i have used the suggested code but still it is coming as the whole url in the "URL" type field.