How to show the folder path of a file in library views

Introduction

Firstly, I want to make a mention to this great blog post by Tom Benjamin for giving me the direction as to how to achieve this. His post is way more complex than what I was looking to do, so if you want to find out more about how to show files from a folder using CAML queries take a look:

Link: https://www.tombenjamin.ca/blog/designer/view/using-caml-query-show-files-folder/

The scenario

A common request I get is:

How do I see what folders/ sub-folders my files are in at a glance

– all users everywhere

Out of the box, there aren’t any columns available that you could potentially leverage to display this information in a standard SharePoint 2010 library.

The solution

So, just by adding one value in SharePoint Designer, here’s how you do it:

  • Navigate to the library you wish to change, create a new view under Library Tools > Library > Create View
  • Choose the relevant format of your view, give your view a name and press OK
  • Open SharePoint Designer > Open the site > open the library you were just working in
  • In the Views pane > click to open the view you just created
In SharePoint Designer, clicking on the view name will open the view in edit mode
  • In the code editor window, scroll down until you see something like the following:
<ViewFields>
	<FieldRef Name="DocIcon"/>
	<FieldRef Name="LinkFilename"/>
	<FieldRef Name="Modified"/>
	<FieldRef Name="Editor"/>
</ViewFields>
  • Add the following field reference in between the opening <ViewFields> and closing </ViewFields>
  • Add the field reference in the display order you would like it to appear in the view
Add the field reference to the View Fields list
  • Press the Save icon to save your changes
  • Press the Preview button to see your view in action in the browser

Now you will notice there is a new column being displayed “Path”, that is showing us the full location of the file or folder in the libary. You’ll also notice that this path will display data when at the library root, or in any folders or sub-folders in the library.

Library root displaying a files path
File in sub-folder displaying relative location

Bonus

Taking this one step further, what if we wanted to show files of a certain type, then create a view that groups these files by their folder location? Guess what, that’s exactly what I did!

  • Navigate to your library > create a new view as before, this time base your new view off the one you just created
  • If you wish to only show files of a particular type, use the filter by settings (for example below is filtered to only shows Word documents)
  • Make sure “show all items without folders” is selected
  • Press OK
Filtering to only show word documents, also showing items without folders
  • Back in SharePoint Designer > Open up the view you just created
  • Scroll down until you see the opening <Query> tag and add the following beneath it:
<GroupBy Collapse="FALSE" GroupLimit="30">
	<FieldRef Name="FileDirRef"/>
</GroupBy>

Save and preview your view, it should now be grouping by the Path field:

I know this has proven really useful for my company, so hopefully this helps out someone else too 🙂


Microsoft 365 update for April 2019

Another bumper post for April, in this months update:

Let’s get started!

SharePoint updates

Files restore for SharePoint and Microsoft Teams

Files restore offers a self-service recover solutionthat allows administrators and site owners to restore files from any point in time during the last 30 days. Look for a new “Restore this library” option within the library settings panel.

Files restore example for SharePoint document libraries
Find out more:

Modern Document Sets

Long awaited modern document sets will update the user interface to bring them inline with modern sharepoint. Document sets allow you to group related documents together using shared metadata. Modern document sets also unlock the same intuitive user actions like drag and drop content, link to content that lives outside the document set, pin files and much, much more.

Modern Document Sets in SharePoint
Find out more:

News Audience Targeting

Audience targeting is a new feature within the news and highlighted content web parts that enables authors and site owners to tag news articles with Azure Active Directory groups to filter content through web parts to people within those groups.

Find out more:

Author reply emails for comments, replies and likes

Now when someone comments on your page or news post, SharePoint notifies you via email. Multiple comments will be batched so that you receive a single email. This feature will start rollout to targeted release in April, with worldwide rollout currently scheduled to be completed in mid-June 2019.

Find out more:

Connected web parts for SharePoint

Coming soon are three new connected web parts for SharePoint Online that allow you to display data from list and library web parts. With the List Properties, File Viewer and Embed web parts you can now connect to a data source and interact with lists and libraries in new ways.

Find out more:

Multi-Geo in SharePoint Online and Office 365 Groups

SharePoint Online and Office 365 Groups now joins Exchange Online and OneDrive in having the ability to enable where SharePoint sites and their content is stored.

Multi-Geo in SharePoint and Office 365 Groups enables global businesses to control the country or region where shared resources like SharePoint Team Sites, Office 365 Groups content (associated SharePoint Sites and Groups mailboxes) are stored at-rest.

Introducing Office 365 Multi-Geo
Find out more:

Autodesk AutoCAD integration for SharePoint and OneDrive

New integrations with Autodesk connect OneDrive and SharePoint to the drafting tools available through AutoCAD. As you work with DWG files across these applications, you can open and edit them in the AutoCAD desktop application, the AutoCAD mobile app, and the new AutoCAD web app.

Find out more:

You can now use larger, more flexible image types to upload your company logo in the Office 365 navigation bar. You will be able to upload a custom logo of any file size/ format via a URL in order to improve the clarity of the logo image that your users see.

Find out more:

Office 365 Group card enhancements

Improvements to the Office 365 group “hover cards” so that you can act on the group within the context of what you’re doing, rather than going to a separate page. You can search through all group members, renew the group per any set expiry, and approve pending members.

Office 365 Group card enhancements
Find out more:

Microsoft Teams updates

Praise badges

Praise in Microsoft Teams is the new way to show your appreciation and encourage each other at work. Send in a 1:1 chat or post it to a channel for the entire team.

Find out more:

Teams PowerShell module GA

The Teams PowerShell module is now generally available. This PowerShell module allows you to manage the lifecycle of teams within your organisation.

Find out more:

Request to add on behalf of

You can now request on behalf of someone else to join a private team. Teams can be created as either private, where admins control membership, or public, where anyone in the organization is welcome to join.

Increased member limits

Organisation wide teams now have higher size limits, so they can have up to 5000 members in a team. Global administrators can easily create a public team that pulls in every user in the organisation and keeps the membership up to date with Active Directory as users join and leave.

Org-wide teams now have higher size limits

Show/ hide teams

It’s now much easier to keep your teams list tidy. What used to be Favorite and Remove from favorites is now Show and Hide. Choose which teams and channels you want to show in your teams list and hide the rest. You’ll still get notified when @mentioned, they just won’t clutter your teams list.

Hiding a team from a list view
Find out more:

OneDrive updates

Golden folder icon design

OneDrive is introducing golden folders with subtle, yet noticeable clues emblazoned on the icon to remind you of the contents and sharing status of each folder. Golden folders are being rolled out across mobile and web in OneDrive, SharePoint and connected experiences in other apps.

Golden folders in OneDrive and the OneDrive mobile app
Find out more:

OneDrive sync client improvements

The OneDrive sync client lets you can access and share all your files directly from your desktop in Windows File Explore or macOS Finder. Some new updates for the sync client include:

  • Self-help option: “Illegal files names not syncing” 
    A new in-app resolution to sync errors – like when using an Asterix “*” symbol or any file name starting with “~$” – to help avert and solve naming blockers, to then rename the file and continue with upload
  • Request assistance
    Look for a new “Get Help” option in the OneDrive activity center on your desktop. This enables people to initiate a support ticket.
  • Prompt for pending uploads
    And one last “wait, before you go” feature… the OneDrive sync client will also notify users when they have pending uploads when the computer is shutting down or going into standby
Find out more:

Block download option for specific people sharing link

You are now able to use the “Block download” functionality that allows people to block recipients from downloading, copying and pasting shared content when using the “Specific people” style sharing links.

Find out more:

Office client apps – required document properties updates

Users will now be able to save Office files with missing required properties. This change only applies to the Office files synced by the OneDrive sync client. Additionally, users can add, or update required properties for a document by navigating to the file in the SharePoint document library and entering the appropriate value.

Find out more:

Other, related updates

Yammer conversations & highlights web part

The Yammer conversations wep part enables you to integrate topics, groups or users into SharePoint. This combines the social nature of learning across organizations with the content and knowledge management powers of SharePoint.

The Yammer Highlights web part, provides a quick overview of active conversations and a targeted portal to specific groups or conversations in Yammer.

Microsoft Search in Bing Preview includes Yammer conversations ​

Yammer conversations or conversations between co-workers will now start appearing Microsoft Search in Bing. Microsoft Search will only return information and files that you have permission to see.

Find out more:

New icons in Office 365 apps

Microsoft have updated their available icon set, with nearly 350 new icons being added to choose from. You are able to rotate, resize, and recolor the icons without any loss in the quality of the image. You can also separate the icon into its components and use only the pieces you want.

Find out more:

Power BI web by example connector

The Power BI web by example connector allows customers to scrape data from HTML pages. It supports ingesting any data element on the page, beyond just HTML tables. You can now automatically suggest Power BI tables based on HTML element repetition patterns.

Find out more:

Custom assessments in Compliance Manager

Compliance Manager now allows you to create custom risk assessments of any application used in your organization. This customised assessments capability enables IT to import their own security and compliance controls into Compliance Manager, including those for corporate policy, local law, and industrial standards.

Find out more:

Security Policy Advisor

Office Security Policy Advisor is a new intelligent service, now available in preview, that uses behavior-based analysis to help IT admins to quantify the risks and benefits of applying a tailored policy, and monitor policy health over time, for their Office clients.

Admins can now deploy policies with a single click and easily update, or even roll back, policies.

Find out more:

Links and resources

Microsoft 365 blogNew in Microsoft 365 – April 2019
New in Microsoft 365 video – April 2019
SharePoint Roadmap Pitstop –
April 2019
What’s new in Teams –
April 2019
OneDrive Roadmap Roundup –
April 2019