Jan 20 2023 12:07 PM
Jan 20 2023 12:07 PM
I'm using Highlighted Content to provide a list of documents in a directory using Filter to show items that have Active in the Status column. This way, regardless of the number of nested folders an item may be in, anything with Active in Status will appear in this Highlighted Content web part (a VERY useful feature!!).
Currently, it's sorted by Most Recent but I want to sort by Date Created. As we acquire new documents, they should appear at the top of the list (provided Active is set in Status). The issue with sorting by Most Recent is that this is putting the most recent MODIFIED documents at the top of Highlighted Content.
Is there a way to build a Custom Query to sort by Date Created?
Jan 21 2023 05:20 AM
Hi @Anthony-123 ,
If you use the source "This site collection" or "This site" or "All Sites" or "Select Sites", then try to sort your data by the managed property "Created" descending
If you select the source "A document library on this site", then sorting by the "Created" date does not seem to work with the "Highlighted Content Webpart".
But in that case you can simply use the "Document Library webpart".
If you don't like the "Tile" view, you can customize it.
This would too much for this post, but take a look at i.e. this sample https://github.com/pnp/List-Formatting/tree/master/view-samples/document-library-gallery-card
Jan 27 2023 08:05 AM
Jan 27 2023 08:19 AM
Jan 28 2023 02:30 AMSolution
"Going to my document library and creating a new view that sorts by active column results in zero items. This is why I'm using the Highlighted Content web part. If the document library view were able to show all documents regardless of number of nested folders, this would be ideal."
If you want to display all files in a view of a documentlibrary regardless of folders, you need to edit the View
And scroll down to and expand "Folders" and check "Show all items without folders"
This results in a view that displays all files in the document library regardless of folders.
You can still sort and filter that view to your liking.