how to use json in sharepoint list column

Wael Saleh Abughres 21 Reputation points
2020-12-16T16:29:25.977+00:00

how to use json in sharepoint list column to change the text in Multiple lines of text column to a hyperlink Where the characters are more than 256
48841-e1.png

Microsoft 365 and Office SharePoint For business Windows
0 comments No comments
{count} votes

Accepted answer
  1. Emily Du-MSFT 51,836 Reputation points Microsoft External Staff
    2020-12-17T07:47:13.86+00:00

    @Wael Saleh Abughres
    The multiple line text column needs to be set to allow only Plain text since (Enhanced) Rich text will add additional elements to the column values so that it breaks the formatted hyperlinks. Then you add links URLs as text in the multiple line text column.

    Here’s a sample script for JSON formatting:

    {  
       "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",  
       "elmType": "a",  
       "txtContent": "=if(@currentField=='','','Click Here')",  
       "attributes": {  
          "target": "_blank",  
          "href": "=@currentField"  
       }  
    }  
    

    Reference:
    Create clickable actions - Turn field values into hyperlinks.


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    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.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.