LookUp Columns to link to documents in a different list

Copper Contributor

Hello,

 

I have a request from a user where they want to directly associate documents from a sharepoint list to a file in a document library. I've been trying multiple different solutions and so far the closest I've gotten to success is with a LookUp column in the document library and formatting the column with custom JSON that I found elsewhere (see below). The problem I have is it isn't opening directly to the file itself. Changing the JSON I've had it link to different files but open the properties, make all the listed documents one combined link that opens to what seems to be the correct url for the list item but gives a blank screen, and the link opens the file in the document library. Does anyone know how I can achieve a document library lookup column that can contain a link to each item that is entered into it, even with multiple items in one file submission?

 

  1. {
  2. "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  3. "elmType": "a",
  4. "txtContent": "@currentField.lookupValue",
  5. "attributes": {
  6. "target": "_blank",
  7. "href": "='https://abctenant.sharepoint.com/sites/Demo/Shared%20Documents/' + @currentField.lookupValue"
  8. }
  9. }
1 Reply
Just wanted to check if you ever resolved this?