URL field in list view is too long - can make it shorter or change what is shown?

thrsdy1512
Tera Expert

Hi,

On the incident table I have used a Business Rule to create a URL and display this in a field in list view on the table. The URL is created using a unique incident ID and URL link to specific records that are not held in service now. The BR combines these 2 to create the URL and display it in the field. 

 

I would like the field to only show part of the link, eg

https://www.exampleurl.com/incidentrefxxx........

Rather than the whole URL which is 105 characters long. 

 

I have tried playing about with dictionary attributes but have been unsuccessful. I have also tried to amend the business rule so it's displayed as a hyperlink with the word LINK  but that breaks the URL and and includes the hyperlink text as part of the URL. 

 

Open to all suggestions that will help make this easier on the eye. 

1 ACCEPTED SOLUTION

I have tried multiple ways to mask URL in the list view but unfortunately there is no way to achieve this with single field.

 

If having another field is fine for you then,

1). Create another field to copy/set the masked URL value and show this field on the list view 

2). Hide the actual URL field in the list view 



Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke

View solution in original post

6 REPLIES 6

This is the route i ended up going down, thank you

Dan Ellis
Kilo Sage

I know this is an old post but I came across it whilst searching for a solution and got it working so sharing the solution for everyone else.

 

We recently had a requirement where we needed to include a URL column in a related list but the URL was often quite long.

 

The guidance in https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0695430 works for non URL fields.

 

For URL fields you can use the same approach of creating a Field Style but you must include extra CSS within the "Style".

 

In the example below I set the width to 150px but you can make this whatever you want.

 

CSS:

width: 150px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;

 

Field Style:

DanEllis_0-1754562920790.png

 

How it looks in the list:

DanEllis_1-1754563187661.png