I have all of our team's files in the documents repository but I want to be able to create a documents app that I can put on a page that just shows one folder. Is that possible? I have full modify access.

- folder 1
- folder 2
- folder 3

---New page---

Documents App
-folder 1

*This is for a 365 SharePoint through the web interface, I do not have SharePoint designer installed.

*I'm hoping to accomplish this using the ootb apps, I have a programming background but would like to keep my time investment low for this project.

  • Are you talking about an actual Visual Studio SharePoint app, or a simple, ootb list view "app"?
    – wjervis
    Jul 9 '14 at 15:46
  • the ootb list view "App".
    – Jeff
    Jul 28 '14 at 15:39
  • The easiest solution would be to throw a list view web part on a page, travel the folder, and then capture the URL. Use that URL in any navigation that points to the page. The next easiest would be to edit the CAML in Designer to look for items whose url contain the folder name.
    – wjervis
    Jul 28 '14 at 17:12

My suggestion (explained at the bottom) is to just not use folders, then showing only specific groups of items in one view becomes quite easy. Alternatively you could use folder specific default metadata values, then filter your list view on those... otherwise you will probably need to install SPD or create a list view from scratch using HTML and JavaScript

The easiest, most out of the box solution to your problem is to create a text or choice field in your document library, and set it's default value based on whatever folder it's dropped in.

First you'll need a text/choice column to hold some data, then you configure location specific defaults by going to List Settings -> Column Default Value Settings, then select the location (folder) you want to configure. You'll set a corresponding value (something like the folder name) for each folder to your new column.

Now every time a document is uploaded, created, added in bulk (through explorer view, for instance), or created from an office program and saved to the location, the document will get the correct metadata value associated with the folder.

The major drawback here (other than those inherent in folder use) is that if a document is ever moved that text field won't be able to update itself, the person moving it will have to set it appropriately, which can be quite error prone.


Next easiest out of the box method is to make a workflow that fires on item creation which will write the 'Path' value (or one of the numerous other builtin URL item fields) to a metadata (text) field on your document items -- then filter a list view for files that are inside of that folder (via your new text field that contains the item URL) -- You can also make the workflow fire each time an item is edited if you want to make sure the path stays up to date as items are changed or moved.

The easiest, least amount of effort solution with SPD (assuming you understand some CAML) is to create the list view on the page then modify the list view web part's CAML query to filter only for items containing the URL you want, as wjervis suggested. You would need to filter on the FileRef field (or again, one of the many URL internal fields) -- if you create the list view in the browser and then filter a field with the contains operator that should get you most of the way there, you would just need to change the field info and the url string.

If you want to go the HTML and JavaScript custom route I would recommend using something like knockout so you can keep track of all the list item details you retrieve (with the JSOM or the REST API) and have your page HTML modified accordingly... but since this would be a truly custom solution, you can obviously use whatever you're comfortable with... with the caveat here that you would need to use the JSOM or REST API to get the SP data in the first place - you can the SOAP web services too I suppose, but the JSOM and REST API are much more functional and robust. You wouldn't need to install anything to do this, and since it's all client side it's perfectly fine on O365, even just using the web interface.

What I would do (without knowing all the specifics of your project/environment): You could also completely skip using folders, and use a choice/text field to categorize objects instead. Using metadata terms instead of folders is widely considered best practice for document management within SharePoint anyway, because it provides a number of other advantages in addition to making problems like this easier to manage.

You would avoid the hassle of working with variable URL paths, keep the ability to organize items in categories (use view grouping and it organizes your items just like how folders work), reduce the upkeep/possibility of duplicate files across your folders, and solve your initial problem of creating filtered views since you can quite easily filter on text/choice fields using normal list views.


You could probably tweak the library view to achieve this scenario.

1) Go to the library and click on create view in the ribbon. Click on 'All Documents View' under 'Start from Existing View'

2) Under 'Filter' Section set the following query using the drop downs

Content Type = "Folder" AND Name = "Folder 1" OR Content Type != "Folder"

3) Create a webpart page and add your team library webpart. In the webpart properties change the view to point to your newly created view.

Also I do agree with @john on not using folders and using metadata.

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.