Add Base URL to URL type field

Rocky5
Kilo Sage

Hello Experts,

 

I have created a URL type field on the custom table/form. And, the value comes into it is from external data source that will have Ticket number. Now, If I click on that ticket number, I want it to be routed to the external tool that has a different base url. and the display value should still show as the ticket number only.

 

Thanks,

Rocky.

3 REPLIES 3

AnirudhKumar
Mega Sage

The tricky thing here is that you want the display value to be the ticket number. It's possible but involves customization. You will need to create a UI Macro, associate it to a Formatter and then add the Formatter to your Form layout. Ughh... 

There are other options too like creating a readonly HTML field that has a constructed anchor tag - easy but again too much customization.

 

Let me suggest you the most elegant solution. Change your URL field to a regular String type field. Store the ticket number in it. Create a UI Action button. On clicking, make the button redirect the user to the external site.  A simple window.open() does a great job.

Ankur Bawiskar
Tera Patron

@Rocky5 

not possible with URL type field.

It expects actual URL and won't hold the display text only.

You can add link to that external tool in work notes journal field so that agent can click the link

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Aditya_hublikar
Mega Sage

Hello @Rocky5 ,

 

Unfortunately this is not possible. You can go with approach suggested by @AnirudhKumar .