AnswerBun.com

How to convert text to URL in multi line text column

SharePoint Asked by PowerBI87 on November 8, 2021

I have a flow that populates a multi line text column in SharePoint. I want the fields to be clickable as they are links. I didn’t format the column to be a hyperlink b/c some links are over the 255 character limit. Is there a way to change the format of multi line text column so that it is clickable through JSON?

One Answer

Here is 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": "='https://tenant.sharepoint.com/' + @currentField"
   }
}

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.

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

Another sample: SharePoint Column Formatting - Display A Single line Of Text As Hyperlink.

Answered by Chelsea_MSFT on November 8, 2021

Add your own answers!

Related Questions

Workflow task – How to set priority when assigning a task

1  Asked on December 28, 2021 by etho201

     

SharePoint 2010, how to change column width in list view

2  Asked on December 28, 2021 by j-osborn

     

Logical Architecture of SharePoint

1  Asked on December 26, 2021 by dasarp

   

Link Tracking Breaks Large List Views in Modern

2  Asked on December 26, 2021 by eliot-at-projectfive

       

Manipulate Filters in Javascript

1  Asked on December 24, 2021 by out-shire

       

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir