Forum Discussion
How to open Hyperlink column in list in same tab
Hi Harish_Patil
you can use a column formatting for your hyperlink column and open the link in a new tab:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "a",
"txtContent": "@currentField",
"attributes": {
"href": "@currentField",
"target": "_self"
}
}
Regards, Dave
Hi Dave,
What needs to be add instead of "txtContent": "@currentField" and "href": "@currentField"?
I have column but different different name. Can we take name which I have now in current hyperlink column r can we add some condition to take text? Please find the below screen shot.
Thanks,
Harish Patil
- Rob_ElliottApr 03, 2025Silver Contributor
You don't change them, just leave them as they are. @currentField means that it will display whatever is in that field.
- DaveMehr365Apr 03, 2025MVP
Hi Harish_Patil
you can find the full documentation for SharePoint ColumnFormatting on this site: https://learn.microsoft.com/sharepoint/dev/declarative-customization/column-formatting?WT.mc_id=DX-MVP-5004845
Hope you can find, what you need.
Regards, Dave