How to display 'Lookup Field' in list view

I have added a Lookup field to my list but in the view the column is blank.

I thought I needed to customize the column to display it so I added this:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "txtContent": "@currentField.text"
}

This did not work.

Is there a way to display a Lookup field?

Hi @smithme.

Does the account you are logged in with when you see blank values for the lookup field in the SharePoint list have access to the SharePoint list hosting the lookup field? If not, the entries in the lookup field will be blank. This is one possibility.

Yes.

This is a lookup field that stores the selected value as a JSON object in a text field, not the SharePoint lookup field that is a foreign key to another list.

According to this page it should display like normal but it doesn't do that for me.

https://plumsail.com/docs/forms-sp/how-to/csl.html

@smithme,

Do you mean you are using a lookup control?

If so, you need to configure saving value of the lookup control value to the text field:
image

Yes.

I did just as you describe. I had the control create the "Save to" field and add it to the view, but when I look at the view it doesn't display anything. I finally added the following code to format it:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "txtContent": "@currentField"
}

Now I can see:

Screenshot 2021-06-11 075555

Where as before, I saw only an empty column.