How to create calculated hyperlink in SharePoint Online list
Posted On October 4, 2020
“How can I create a calculated hyperlink in a SharePoint online list? A hyperlink that uses info from another column.”
“The way this was done in the past is no longer allowed for SPO.”
In Modern SharePoint online you can’t create a hyperlink inside calculated column anymore. You might think it’s another piece of lost functionality, but there’s a much more powerful alternative. The possibility to define custom column formatting using JSON.
Maybe you see formatting just as some fancy fonts and colors, but in this case there are much wider possibilities. JSON formatting in SharePoint enables you even to change data displayed in a column. You can completely change what users will see, including creation of hyperlinks.
Building the hyperlink
Prerequisite: you need a column whose content you’ll replace with the hyperlink. Its data will be still in the list, but it won’t be visible to the users, they’ll see only what you’ll define in the JSON.
The JSON formatting is accessible directly from the list view: Column settings > Format this column > Advanced mode.
The following piece of JSON code will replace the column data with a hyperlink.
The JSON formatting gives you a lot of possibilities, not only for building hyperlinks but to create easy to read lists with extensive functionality. This post was only about building hyperlinks, so if you’d like to learn more about doing fancy stuff with your lists, check the Microsoft article on the column formatting.