0

I have a modern Sharepoint page with several lists and a document library. I need to filter list items and documents with the same date. These dates are in a seperate list. I can do it with a classic page but is it possible with a modern page. I tried using a highlighted content web part but could not do it. Is there a way to filter items and documents based on the same metadata field? Jan

0

You can probably do it with an Embed web part. I did one today that filtered a workflow task list by a selected document in a library.

** Disclaimer: I have not tested this with dates! You will need to figure out the date format needed. And be aware that SharePoint dates also have a time part. You may need to add a Calculated Column to create a "date only" date column.

You need two things: an Embed web part and knowing how to filter from a URL Query String. I wrote a blog about the query string filters a long time ago: https://techtrainingnotes.blogspot.com/2012/03/sharepoint-search-filter-or-sort-lists.html

What's described in the article works up to and including SharePoint Online. The only extra thing is if using a Modern UI list in the Embed web part, you need to add useFiltersInViewXml=1 to the URL.

?useFiltersInViewXml=1&FilterName=Status&FilterMultiValue=In%20Progress;Completed

Add an Embed web part to a Modern UI page.

Click the Embed web part.

If the property panel is not displayed on the right of the page, click the web part's Edit button.

Click the "…" and click Connect to Source.

Click the Connect to Source dropdown and click your library's name.

Now for the fun part! Click in the "Website address or embed code box.

Create the HTML for an IFRAME. Set the height and width as needed.

<iframe src="" width="100%" height="150"></iframe>

Between the SRC quotes paste your list's URL and make the following changes:

https://yourDomain/sites/yourSite/Lists/yourWFTaskList/yourCustomView.aspx?useFiltersInViewXml=1&FilterName=yourDateColumn&FilterMultiValue=yourDate&IsDlg=1 

Check mark an item in your "filtering list" and the "filtered list" should only display the filtered items.

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.