Auto populating a column from a Person lookup column

Copper Contributor

I'm formatting a list view with JSON and I'm trying to limit the amount administration where possible.

I have a Person_lookup column that people populate by the usual column property of searching a finding an individual. As part of my custom JSON view format I'd like the persons job title to show next to their people record. I've tried to put in the formula on the Person_job_title column as =[Person_lookup].jobTitle which is the reference for a users job title. But this isn't working since it probably doesn't allow you to reference another column value with the type of People.

 

I'm already customising the view along with grouping the staff members by a category. Can separately also format a column via JSON too or is this disallowed? perhaps with a column ""  

 

Here is my code.

 

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
  "hideSelection": true,
  "hideColumnHeader": true,
  "groupProps": {
    "hideFooter": true,
    "hideSelection": true,
    "headerFormatter": {
      "elmType": "div",
      "style": {
        "flex-wrap": "wrap",
        "display": "flex",
        "box-sizing": "border-box",
        "padding": "4px 8px 5px 8px",
        "border-radius": "6px",
        "align-items": "center",
        "white-space": "nowrap",
        "margin-left": "10px"
      },
      "attributes": {
        "class": "ms-bgColor-themePrimary"
      },
      "children": [
        {
          "elmType": "div",
          "children": [
            {
              "elmType": "span",
              "style": {
                "padding": "10px",
                "font-size": "16px",
                "width": "100%"
              },
              "txtContent": "=substring(@group.fieldData.displayValue,2,99)",
              "attributes": {
                "class": "ms-fontColor-white"
              }
            }
          ]
        }
      ]
    }
  }
}

 

 

0 Replies