0

In a list, I'm trying to customize a column to render an hyperling that use a data: scheme (3rd party app will handle interpretation) :

{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "a", "txtContent": "@currentField", "attributes": { "target": "_blank", "href": "='data:text/plain;charset=utf-8,my field as text :' + @currentField" } } 

However, this does not works (fields renders as simple text).

Is it possible to use such url scheme ?

I'm aware I could build a field customizer, but it's a bit more complex to deploy.

Also tried :

{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "a", "txtContent": "@currentField", "attributes": { "target": "_blank", "href": { "operator": "+", "operands": [ "data:text/plain;charset=utf-8", "my field as text :", "@currentField" ], "data-interception": "on" } } } 

1 Answer 1

1

Quote from Microsoft:

You can't use column formatting to output links to protocols other than http://, https://, or mailto:.

https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting#create-clickable-actions

1
  • Activating the debug also mode helped, as the error message appeared. Thanks for the help Commented Oct 14, 2020 at 10:55

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.