How to insert multiple URL's in a single field?

User150433
Tera Guru

Hello All,

I have a requirement where we have to provide multiple links in a single field.User should have the freedom of clicking on any link and opening in a new tab/window.Currently in out of box functionality of SNC,they have provided a URL field which works as single link and not multiple.

Can someone please provide some assistance on this?

Thanks.

10 REPLIES 10

CapaJC
ServiceNow Employee
ServiceNow Employee

I think an HTML field is going to be as close as you can get. Without creating your own new unsupported field type from the ground up, and I doubt anything like that has ever been documented. Or attempted in any real sense.


nataraj1
Kilo Contributor

Hi Amit,

I have same requirement where user have to provide multiple links in a single URL field. Did you get any luck on this? If yes could you please share the same. Really appreciate your help.

Thanks
Nataraj


geoffcox
Giga Guru

I would suggest creating a new table to hold your links. Each record would have a reference field back to your original form, and a URL field.

Then, add this new table to your form as an embedded related list. Then the user can add one or many URLs to the form, and they would each appear in their own line.

Cheers,
Geoff.


Anurag Tripathi
Mega Patron
Mega Patron

I have done exactly this on   one of my forms but that field is pre populated and not filled by user at the run time.



I have the URLs in an array and   this is how i save them on a text field. This is a server side code



var array = ////HOLDS URL


for(var i = 0;i<array.length;i++)


  {


  task.multiple_url_field += "<a href='"+array[i]+"' target='_new'> "+array[i]+"</a>;"+" ";     //target can be manipulated



}


-Anurag