I want to be able to Group at 4 or more levels in a document library with repeating file names in SharePoint 2007.

It seems that I cannot create a file with the same name in the same SharePoint folder even if my metadata is different and I must group for repeating reports by Year, Month, Dept, Heading. I was using a Filter with the data as well, but it needs to show each item in turn within these groups.

As an example I need to be able to see it like this (expand with the + sign each time)

2012, 2011, 2010 choice expands to

11, 10, 09 choice expand to

English, History, Math choice expands to

green hours, blue hours, red hours

so: reports for 2011 > 10 > math > red hours > list of reports.

Under here I should see the list of reports report one, report two etc. The report names are always the same and would be auto loaded via script on a schedule. I have a similar project that would need 6+ group layers.

I wanted to convert to XSLT Data View and add my Sorting and Grouping that way, but the folders don't have the same metadata as the files and it doesn't seem to work. Oh, and for other reasons, versioning won't fly for this particular set.

I also went the route of creating custom content folder types along with adding metadata to the files, but I still had repeats. Has anyone conquered this for a document repository?


Addition: There's a lot of meat in the question, and I have managed to make 90% of this work, but it isn't perfect yet, so I won't answer yet. Maybe this will help somebody or somebody will see what I am missing for a final solution.

First, how I made it kinda work. I entered SP Designer 2007 and found my view aspx page under my Document Library. Next, I opened the page in Design view. I right clicked on the area where the data is shown and chose convert to an XSLT Data View. This is not a view a this point. Next, right click within this region and choose Show Common Control tasks. The second item down is Sort and Group. In the window, I chose the fields I wanted -Year Month and Dept (All metadata fields). I tried to collapse each to find that Year will not allow itself to remain collapsed. (My new issue).

The page remained imperfect and I got results that didn't show Year and Month properly; rather I had empty row headers. I opened up the Data Source Details Task Pane and clicked on my current data source link. Here, I entered a Sort for Year Month and Dept each ascending. And this is critical: I choose Recursive for item and folder scope.

I went back to the Common Data View Tasks and added items to the Sort order so I end up with the following: the three I just entered along with concat(@Year, " - ", @Month) and one more concat(@Year, " - ", @Month, " - ", @Dept)

I have these 5 sorts in total. I am not showing group headers for Month and Dept, but I am showing for Year, concat Year and Month, and also concat Year Month Dept.
I have the first concat expanding and the last collapsed. If I collapse the first concat, it doesn't behave as such. Also, I cannot set the collapse on Year; it always changes back to expand even if I collapse everything else.

With this setup I see this on load:

Year: 2012 as the first row

2012 December as my second row indented slightly

2012 November on third row .

On Row 4 I have Year: 2013 and row 5 2013 January.

I can click on the + sign to expand 2012 November to show choices "2012 November English", "2012 November Math"... I can click the + sign on "2012 November Math" to see all appropriate reports.

This looks OK, but I'd love it if the very first load showed only the year and then click on it to show only month. This would be preferable to the very first load showing Year and Month.

If you have amendments to improve upon this, please feel free to expand or correct.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.