Forum Discussion

Harish_Patil's avatar
Harish_Patil
Copper Contributor
Mar 31, 2025

How to open Hyperlink column in list in same tab

Hi All,

 

I am using SharePoint online custom list. In the list I have Hyperlink column. If I click on the column then it always open the link in new TAB. I want to open into same TAB.

Can anyone please help us on this topic that how to open Hyperlink column link into same TAB?

Thanks,

Harish Patil

5 Replies

  • 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

    • Harish_Patil's avatar
      Harish_Patil
      Copper Contributor

      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_Elliott's avatar
        Rob_Elliott
        Silver Contributor

        You don't change them, just leave them as they are. @currentField means that it will display whatever is in that field.

    • Harish_Patil's avatar
      Harish_Patil
      Copper Contributor

      Hi Dave,

       

      What should be put instead of "txtContent": "@currentField" and "href": "@currentField"?

      As I have already link into the hyperlink column.

       

      Thanks,

      Harish Patil

Resources