I am new to JSON. Here is what I am trying to do:
first column name -> firstname and second column name -> lastname.
Then in third column I need this to display as a downloadable link -> Randomtext/firstname/lastname.
For example https://www.sagar.sharepoint.com/firstname/lastname
I tried below code but doesn't work:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "=[$firstname] + ' ' + [$lastname]",
"attributes": {
"target": "_blank",
"href": "='https://www.sagar.sharepoint.com/sites/file.txt' = [$firstname] + ' ' + [$lastname]"
}
}
a
element. also there was some issue withhref
attribute in your code. I corrected it (check below answer). You said you want the column inhttps://www.sagar.sharepoint.com/firstname/lastname
format. But, in your code you are doing something else. I don't understand why you are appending firstname and lastname after file name.