SOLVED

How to create functional links with calculation based columns that works with detailed view

Copper Contributor

Hello!

 

I'm trying to do something that could be simple but with no success!

I want to create a link within a column using calculation based columns.

Here is the code I use :

 

=CONCATENER("../../Lists/Matriaux/AllItems.aspx?FilterField1=Site&FilterValue1=";Title)

 

 Then I use column formating to display it a nice way:

 

{
  "elmType": "a",
  "style": {
    "text-decoration": "none",
    "color": "grey"
  },
  "attributes": {
    "href": "@currentField",
    "target": "_blank"
  },
  "children": [
    {
      "elmType": "div",
      "style": {
        "font-size": "24px"
      },
      "attributes": {
        "iconName": "DocumentSet"
      }
    }
  ]
}

 

It works pretty fine:

Help1.png

 

 

But the complicated part for me is when you click on one item to see detailed view...

The link doesn't work, it is not clickable (which is kind of normal at this point):

Help2.png

Which solution should I use to be able:

1- to display a clickable icon in the all items list

AND

2 - have a working link (ideally the same icon too) within the detailed view panel.

 

I have searched solutions with no success. One solution could have been to have HTML <a> displayed within the column but Sharepoint doesn't interpret HTML in columns anymore since few months (if I am not mistaken).

 

Thank you very much for your help!

2 Replies

Any idea? Even if it is to say that it is not possible. Thank you for your help

best response confirmed by Jonathan SARTORI (Copper Contributor)
Solution

@Jonathan SARTORI 

You are right that SharePoint online doesn't support HTML in calculated columns.

 

I will suggest you to use complete site address while creating calculated column within CONCATENATE function (CONCATENER in your case), like:

 

 

=CONCATENER("https://tenant.sharepoint.com/sites/SiteName/Lists/Matriaux/AllItems.aspx?FilterField1=Site&FilterValue1=";Title)

 

 

It will help users to copy the link if it is not possible to make it clickable.

 

Then you can use the JSON as you are already using to show the icon and link in all items list view.

 

To show the clickable link on forms (detailed view panel) you need to customize the list forms using Power Apps.

OR you can wait for the new feature coming to SharePoint soon. Maybe using which you can Configure the list form and make the column clickable.


Please click Mark as Best Response if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

 

1 best response

Accepted Solutions
best response confirmed by Jonathan SARTORI (Copper Contributor)
Solution

@Jonathan SARTORI 

You are right that SharePoint online doesn't support HTML in calculated columns.

 

I will suggest you to use complete site address while creating calculated column within CONCATENATE function (CONCATENER in your case), like:

 

 

=CONCATENER("https://tenant.sharepoint.com/sites/SiteName/Lists/Matriaux/AllItems.aspx?FilterField1=Site&FilterValue1=";Title)

 

 

It will help users to copy the link if it is not possible to make it clickable.

 

Then you can use the JSON as you are already using to show the icon and link in all items list view.

 

To show the clickable link on forms (detailed view panel) you need to customize the list forms using Power Apps.

OR you can wait for the new feature coming to SharePoint soon. Maybe using which you can Configure the list form and make the column clickable.


Please click Mark as Best Response if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

 

View solution in original post