views:

156

answers:

5

I use a flat document list for certain document types and I want to give my users a possiblity to jump to the parent folder of this document.

Is there a column that contains this information? I couldn't find one.

+1  A: 

No, there isn't a column or UI affordance for the parent folder in either a document library or the document library web part, nor is there a way to create a calculated field (without creating a totally custom field in code) - MSFT intended people to use the breadcrumbs I suppose. There are plenty of third party web parts out there for sale that provide this functionality (sort of) -but I haven't found one yet that I would recommend.

Greg Hurlman
A: 

Is it something like this you are looking for?

Magnus Johansson
Not really. I was looking for a field type, so that every item can have link to it's parent folder.
Daniel Ehnert
A: 

As I couldn't find an easy solution for my problem, I just coded that field type myself.

Daniel Ehnert
A: 

I'm looking for the same.

Daniel, can you please share your code?

A: 

Indeed, there is nothing OOTB that provides this information. At best, you can 'guess' the parent folder by getting the second-to-last segment of the FileRef column (the file's own URL):

                     ▼ this one
/web/web/list/folder/folder/file.ext

Of course, that only works when you can have a reasonable expectation the file will actually be at least one folder deep. We have some limited cases where this works.

Rex M