Forum Discussion
SharePoint - Filter stacking
- SharePoint list with a Link to Documents (hyperlink) column. When you click the link, it should open to the library where these documents are stored based on the associated ID for the record with all the documents that have that "Document ID", in this case 5550.
- /AllItems.aspx?FilterField1=ABC_ID&FilterValue1=5550&FilterType1=Text
- This field is a Hyperlink field
- The item opens in the library where the documents are all being stored, but is showing an additional filter value (sometimes, it will show three additional values) for example, it will show 5550, 5596, 2208 (all random each time). Is it caching old searched filters?
- When I go to the library and clear all filters and then filter from the All documents on the 5550, I get all my documents back no problem.
- I compared the URL with the broken filter to the URL from the all documents filter and they are the exact same
Why would this be happening? What is breaking the filter and adding or stacking additional filters to the requested link. Any help to fix this would be appreciated.
6 Replies
- virendrakSteel Contributor
I reviewed the question and got answers most of my previous queries. However, I’m still unclear on how the link is added or generated in the list.
I assume there is a text field where values are entered, and JSON formatting is used to generate the cross-reference link.- I created a library where all documents are stored, and it includes a Document_ID text column. I assign an ID to each document as needed.
I also have another list that contains the same Document_ID column (configured as a text column rather than a hyperlink), where the Document ID value is entered. Using JSON formatting, I generate cross-reference links from the list to the library.
This JSON works for filtering a single ID; handling multiple IDs would require a different approach.
The URL structure contains the following components:
- MSTrainings – Site name
- CMS – Document library name
- CMS DS Content Type.aspx – Library view name
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "style": { "white-space": "normal" }, "attributes": { "class": "sp-css-backgroundColor-warningBackground" }, "children": [ { "elmType": "span", "style": { "margin-right": "2px", "margin-left": "5px", "font-size": "18px" }, "attributes": { "iconName": "FileSymlink" } }, { "elmType": "a", "attributes": { "href": { "operator": "+", "operands": [ "https://YOURTENANT.sharepoint.com/sites/MSTrainings/CMS/Forms/CMS DS Content Type.aspx?FilterField1=Document_ID&FilterType1=Text&FilterValue1=", "[$Document_ID]", "&DefaultItemOpen=1" ] }, "target": "_blank" }, "style": { "color": "#0078d4", "text-decoration": "none", "font-weight": "600", "padding": "2px 4px", "border-radius": "3px", "transition": "all .2s ease-in-out" }, "txtContent": "[$Document_ID]" } ] }If my post solved your issue or answered your query, please mark it as a Solution and give it a Like.
- cc201Copper Contributor
Virendrak,
Thank you for your quick response. I was able to find out the issue here, someone had gone in and added some filtering on the list. I have since removed and locked down the list.
I am however having another issue with filtering on another list.
- The list has 9,444 items; I have a filter set on the Start Date: Today or later and Status: Accept on a grouping for the Start Date
- The label (Start Date: 6/1/2026 (18) the count is off, it's not 18, it's actually 26 items, so the label is not matching the items when I'm directly in the list and selecting all the items for this date
- I also cannot export the file to excel anymore; it's throwing a "You do not have permission to view the entire list because it is larger than the list view threshold enforced by the administrator"; this just started happening on the filter and the export just recently
Any help would be appreciated.
- virendrakSteel Contributor
Hi, I have a few clarifications regarding your setup:
When you mention Document ID, are you referring to:
- The SharePoint Document ID feature (enabled at the Site Collection level),
- OR A custom column, or
- OR The out-of-the-box ID column in the library/list?
- How are you constructing the URL for filtering?
- Is it manually entered?
- Generated through some automation (Power Automate, custom approach, etc.)?
- Or created using JSON column formatting?
- This hyperlink column - is the intent to:
- Open a specific document directly, or
- Navigate to the document library filtered to show one or more documents (based on the ID)?
Understanding this will help identify why multiple filter values are being applied or stacked.
- cc201Copper Contributor
Thank you for your response.
I have discovered that someone had gone in and added numerous filters. I have removed them from the list and locked down the list permissions.
- cc201Copper Contributor
Virendrak,
Thank you so much for your quick response!
I spent some additional time reviewing this and was able to realize that someone had gone into the filters and created additional filters that were stacking/blocking my DocLink URL's. I removed those and it stabilized the library and the filters! I also locked the list down as well!
The ID column is custom single text field, the URL is pulling from a library where all the documents are uploaded to, and the hyperlink is designed to open a specific set of documents all that have the specific ID number, so it might be 10, 15, 20 associated documents, so the later "Navigate to the document library filtered to show one or more documents based on the ID. Working as intended now.
I do have another filtering dilemma.
- I have a filter on SP list that has 9,944 items; the filter is set to show items from today or later with a status of Accept; grouped by the start date; the start date is an indexed column and so is the status colum
- I have noticed that the label on the grouping, for example, Start Date: 6/29/2026 (10) shows this label, but the actual items for this start date within the list is much more, in this example 41 actual items with a 6/29/26 Start Date
- I also have the grouping set to "collapse", but the items are "expanded" instead, they really should show like the following exampe:
- Start Date: 6/10/2026 (15)
- Start Date: 6/22/2026 (45)
- Start Date: 6/27/2026 (11)
- I do not have a sort set on the filter
Why would the label not show the true item count? I also can't tell the reasoning as to why the filter goes from May 31, 2026 to the last filter for August 24, 2026, so I guess a 90-day spread. I'll have to dig more into this to see why it's only showing through August since it's saying from today or later, how does it know where to stop on the "later". Is this a SharePoint list filter setting?
Again, thank you for your time and help.
- virendrakSteel Contributor
SharePoint behaves differently once you exceed the 5,000 item threshold. Since your list has close to 10K items, I’d recommend creating multiple views so that each query operates on a smaller dataset. For example, you could segment the data by year or another logical filter to keep results within the threshold limits.
If you need to export items, try exporting from a view without grouping or complex filters applied (a flat view). Or use PowerShell script....
Also, if you have access to Power BI, it would be a better option for reporting and handling larger datasets efficiently.