Calculated column Translate into JSON Formatting

cooltechie-5986 1 Reputation point


I have a calculated column with the below formula. This calculated column rendered as HTML with a clickable link in SP 2013. However, in SP 2019 it doesn't work. I need to translate same to a JSON Column formatting that I can use.

How can I incorporate JSON Formatting with same logic? Any help is appreciated.


The calculated formula I have is:

IF(New,"Uploading...",""),"<a href='#' class='cascadingLink' onclick='openInDialog(700,950,true,true,true,""/sites/TW/Reviews/Reviews/Forms/EditForm.aspx?ID="&CID&""");'>Edit Review</a>"),"")

where "New" and "CID" are the list columns.  

How can I replicate this rendering using JSON Column formatting or JSLink ? Any help with JSON column formatting code is highly appreciated.
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,211 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Emily Du-MSFT 43,831 Reputation points Microsoft Vendor

    Based on your description, I understand that you want to add a clickable link in a column by using JSON formatting.

    Here is an example for you:

    1.Create a text column.

    2.Use following formula in the column.

       "$schema": "",
       "elmType": "a",
       "txtContent": "Edit Review",
       "attributes": {
          "target": "_blank",
          "href": "='http://sp/sites/sites/TW/Reviews/Reviews/Forms/EditForm.aspx?ID='+[$CID]"


    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.