I have a SharePoint Online list and a document library. Within the list, there is a Lesson Name column (Title is internal name). I'm trying to add a column (to the list) that includes a link to the document library that only populates the documents associated with the lesson name of the list item.
I've created a calculated column and used the below JSON in the column formatting box. A link is created and takes me to the document library BUT it includes, what seems to be random results. What am I doing wrong?
I'm also open to any other suggestions on the best way to create a link to the filtered library. I've tried a Power Automate flow in the past and have had multiple issues that I've been unable to resolve. I've also considered a lookup column as that has been suggested quite a bit but I can't wrap my head around how that will work. So hoping for some help here from you lovely people!
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "a",
"txtContent": "= 'Materials for ' + [$Title]",
"attributes": {
"href": "= @currentWeb + '/Part%20C%20Materials/Forms/AllItems.aspx?view=7&q=' + [$Title]",
"target": "_blank"
}
}


