I have a list and a document library that I'd like to link.

I would love to be able to have a link in the list that would search the document library based on a specific field.


The list contains claim data, including a claims number. I would like a link or button as a column where a user can click it and it would search the document library for that claims number and present the documents for that claims number.

I have tried using built in filters on the list and library but can't get anything to work.

I am using SharePoint Online.


You can use SharePoint JSON Column formatting to create a link in list view.

I am using below JSON code to create a link in list view. On click of link, it will open a new tab with filtered document library:

  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "a",
  "txtContent": "= 'Search Library for' + [$Title]",
  "attributes": {
    "href": "= @currentWeb + '/Shared Documents/Forms/AllItems.aspx?view=7&q=' + [$Title]",
    "target": "_blank"

Here I am using "Title" column. You can use any column as per your requirements, just make sure you are using correct internal name of column.


List view:

enter image description here

Library with search results:

enter image description here

  • 1
    Thank you so very much, this has worked perfectly! – Chris Bauer Mar 23 at 8:49

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.