Basically I need to find out the item URL to populate the href attribute of an "a" element in a JSON view format (aka rowFormatter) in SharePoint online. Is there is predefined shortcut for the item URL?

     "elmType": "a",
     "attributes": {
       "href": "[$ItemUrl]"
     "txtContent": "CLICK HERE"

I made the [$ItemUrl] up, it does not work like this.


You could use $ID.

Sample demo:

  "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
  "elmType": "a",
  "txtContent": "@currentField",
  "attributes": {
    "target": "_blank",
    "href": "='/sites/Developer/Lists/ChildB/DispForm.aspx?ID=' + [$ID]"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.