Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

How to set hyper link for the second column in list view

ramesh_r
Giga Sage

Hi All,

 

By default the first field will be hyperlink in list view but i want both first and second field should be hyperlink

Please help me to get the solution

find_real_file.png

Thank you

Ramesh R

5 REPLIES 5

hvrdhn88
Giga Patron

I doubt if you can do that. only reference type field can be clickable as second column 

 

May i know your business need. 

 

have a look on blog below. this would be not exact same what are you looking for but this might give you some idea. 

 

http://www.john-james-andersen.com/blog/service-now/making-linky-lists-in-servicenow-list-views.html

Ankur Bawiskar
Tera Patron

Hi Ramesh,

That may not be possible out of the box

What is the business requirement here to do this?

Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

DirkRedeker
Mega Sage

Hi

There is a OOB rule applying to lists:

a) if the first column is NOT a Reference field, the form of the current table will be opened

b) if the first column IS a Reference field, the form of the referenced table will be opened.

I do not think, you can change this standard behaviour.

 

Let me know, if that answers your question and mark my answer as correct and helpful, please.

Thanks & BR

Dirk

DrewW
Mega Sage

So the system makes the first non-reference field a link to the record.  There are a few ways to make the second column a link but I do not advise any of them.

1 - Create a UI Script that manipulates the DOM.  Don't do this, not a best practice and could slow things down and also could break after an upgrade.

2 - Create a Document ID column and have it its table column set to sys_class_name.  Then on insert set the DocumentID field you created to the sys_id of the current record.  Then where ever that column is in the list it will be a link to the current record but it will says

Incident: INC0010056

Not the best display but it works.  I would not do this one either because it just adds complexity for no real benefit but if you must have it this way its the easiest one I know of.