I'm wanting to create a clickable link using JSON column formatting, for a product code (like CRM 31/22) by referring to a hypertext link in another column called CRM_URL.
I am trying this:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "a",
"txtContent": "@currentField",
"attributes": {
"target": "_blank",
"href":"=@$CRM_URL"
}
}
But it doesn't parse the content of the field called CRM_URL, it simply generates a hyperlink comprising the list URL + "CRM_URL".
What I'm trying to do is similar to the example given in the MS documentation, but extracting the value from another column in the list.
Just can't work out the syntax.
