Change URL display text in list

sgodinho
Kilo Contributor

Hello,

I have a URL field, and it is displaying the full, hyperlinked, URL. I was wondering if, rather than the field displaying the full URL, it was possible to say something like, "View Dashboard". 

The URL field is calculated, and opens fine. It's just ugly and I was wondering if anyone has had any better luck trying to fix something like this yet.

I also have the right-click UI action working, but would like a "View Dashboard" link for visibility.

Thanks in advance!

5 REPLIES 5

MrMuhammad
Giga Sage

Hi,

I am adding a thread here. Please see Chuck Tomasi's solution later in the thread. I hope this will help.

https://community.servicenow.com/community?id=community_question&sys_id=027a87e9db5cdbc01dcaf3231f96...

Please mark this accepted & helpful if it answered your question.

Thanks & Regards,
Sharjeel

 

Regards,
Muhammad

Mohammad Danis1
Giga Guru

Hi,

I found one solution which Chuck has provided in one of the post, please try it will help you : 

 

Here's my idea (it needs some HTML styling).

 

 

 

Create a UI Macro (System UI> Macro). Mine is called "website". The name matters because it is used as a formatter which you can add to the form.

 

 

 

My simple UI macro looks like this:

 

 

 

find_real_file.png

 

 

 

<?xml version="1.0" encoding="utf-8" ?>

 

<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">

 

  <g:evaluate jelly="true">

 

  var gr = new GlideRecord(jelly.jvar_ref_table);

 

  if (gr.get(jelly.sys_id)) {

 

  gs.log('url=' + gr.u_url);

 

  }

 

 

 

  </g:evaluate>

 

  Website: <a target="_blank" href='${gr.u_url}'>LINK</a>

 

</j:jelly>

 

 

Next, create a formatter (System UI> Formatter)

 

 

 

find_real_file.png

 

 

 

Make sure the Formatter field is the name of your macro defined above.

 

 

 

Finally, place the field on the form using the usual methods (Configure> Form Layout or Configure> Form Design). You will find your formatter listed with the other formatters (like Activities (filtered)).

 

find_real_file.png

 

 

 

Granted, mine's not the prettiest thing, with a little HTML style and table for alignment, it can be better. The top URL is the original field value. The bottom "Website" has a clickable link that opens in a new window.

 

 

 

find_real_file.png

 

 

 

http://wiki.servicenow.com/index.php?title=UI_Macros

 

Creating a Formatter - ServiceNow Wiki  

 

Kind Regards,
Mohammad Danish

Hello,

I appreciate the thought. Unfortunately, the formatter does not meet the need because it is not visible from list view. We need this to show up on a list for dashboard purposes. 

RaghavSh
Kilo Patron

Refer: https://community.servicenow.com/community?id=community_question&sys_id=027a87e9db5cdbc01dcaf3231f96...

It have couple of options to solve your problem.


Raghav
MVP 2023