Tasks Lists Roll-up beta, available for download

A new addition to the SharePoint User’s Toolkit: a Tasks Lists Roll-up Web Part. When placed on a SharePoint 2007 page (wss or MOSS), this Web Part will aggregate tasks from the current site and all its sub-sites.

After downloading the Web Part, you can add it to your page via the page import option, or include it in your Web Part gallery. This is a regular Data View Web Part, and you can later modify the layout in SharePoint Designer. Without SPD, you could also tweak it directly through the SharePoint UI, or even via a text editor.

Lists roll-ups are available OOTB in SharePoint, thanks to the Data View Web Part – no need for a Content Query Web Part (MOSS only) or third party tools. However setting a DVWP to work in CrossList mode is not easy, even for experienced SharePointers. Hopefully this preconfigured Web Part will give a jumpstart to your cross-list experience.

I’ll publish more explanations in the days to come. I also plan to add more options in the future, as well as roll-ups for other lists – feedback and suggestions are welcome!

In case of emergency
If your customizations break your page, keep in mind the contents=1 trick (explained for example at the end of this article).

Advertisements

48 thoughts on “Tasks Lists Roll-up beta, available for download

  1. Pingback: SharePoint Kaffeetasse 183 - Michael Greth [SharePoint MVP] - SharePointCommunity

  2. Pingback: SPPD142 SharePointPodcast - Michael Greth [SharePoint MVP] - SharePointCommunity

  3. Pingback: SPPD142 SharePointPodcast - SharePointPodcast - SharePointCommunity

  4. This is quite nice, but what would really kick it, would be the fact, that I could query for *my* tasks. Well, that could easily be done be modifying the where clause of the CAML, but … I would also include tasks which are not assigned to me directly, but indirect via a group which I’m a member of.

    • As I mentioned in the post, what you get is a regular DVWP, to which you can apply usual filtering methods (CAML clause or data view filter).

      Indirect filtering via a group is a separate issue (roll-up or not doesn’t make a difference). I don’t see how this could be done directly in the Web Part. A good question for a forum!

      • Hmm, at least when you’re on the site where the task list resides you have a view called “assigned to my groups” (or something like that). So this has do be possible somehow – I just don’t hope they loop over all items and check the group membership; although I hestitate to find our because of “fear”.

  5. If you look at the CAML for the LVWP on the By My Groups view page, you’ll see this Where clause:

    <Where>
      <Membership Type="CurrentUserGroups">
        <FieldRef Name="AssignedTo"/>
      </Membership>
    </Where>
    

    If you look at the CAML schema (starting here http://msdn.microsoft.com/en-us/library/ms462365.aspx), you’ll see the details for Membership here http://msdn.microsoft.com/en-us/library/aa544234.aspx.

    Frankly, this is a new one to me, but it makes sense.

    M.

  6. Pingback: CAML Filter for Current Group Membership « Marc D Anderson's Blog

  7. Henning, I called Marc to the rescue and as you can see it didn’t take him long to come back to me with the answer. Click the above link to read his blog post.
    Even better, the reference he provides in his post shows a better scenario than the default SharePoint view: how to handle situations where the user is:
    – either assigned a task based on membership in a group
    – or assigned a task directly:

    <Or>
      <Membership Type=\"CurrentUserGroups\">
        <FieldRef Name=\"AssignedTo\"/>
      </Membership>
      <Eq>
        <FieldRef Name=\"AssignedTo\"></FieldRef>
        <Value Type=\"Integer\">
          <UserID/>
        </Value>
      </Eq>
    </Or>
    

    Marc, thank you so much!

  8. Hi Christophe, I installed the webpart but no tasks are listed, is it possibly due to the fact I am using a french Sharepoint (field names problem?) Thanks

    • Patrick, I think you’re correct: you’ll need to convert the names to the French equivalents. Make sure you use the internal names btw. You should get the correct names by opening a tasks list in SharePoint Designer and converting it into a Data View.

  9. Hi, no luck so far… French équivalent are for example “Tritre” for “Title” or “Echéance” for “DueDate”. I guess internal names are in english (Title for example). Has a french Sharepoint user succeeded with this webpart? We badly need it… 😉 Thanks!

  10. Ok, internal names in a french SharePoint are logicaly english names, that is “Title”, “Status”, and so on… I’ll test on my site while waiting for an advice from LinkedIn, thanks.

  11. Everything is working now (on a french site). Now I need to tweak the Query clause, but what text editor to use? Part of the code in Notepad++ appears ok but the Select statement is displayed with HTML codes like &amp…etc and it’s too dificult to edit like that. What editor do you use? Thanks.

  12. Update on patrickemin’s questions (who got everything working):
    – It seems that all languages use the English internal field names, so it it not too difficult to tweak the code for non-English languages.
    – Once the Web Part is on the page, the layout can be modified with SharePoint Designer, like any Data View Web Part.
    – the query clause is harder to tweak. You’ll need to go in code view in SPD, or build your own data source from scratch.

  13. Hi Christophe, I’m having trouble and I was so very much looking forward to seeing yet another of your brilliant solutions fix my problems! I’m using OotB task lists with the addition of a ‘project’ column, 3 subsites same templated task list, there are no tasks on the main task list. Does it have to be on the page with this web part? I see the web part, but no tasks. When you say ‘tweak’ it, do I have to tweak it to to make it work or is it meant to work upon download and import? My task lists on all sites are grouped, does that make a difference? Thanks for any help.

    • What you get is a Data View Web Part in cross-list mode. There is nothing else to add, it should just work when you import it to the page. The Web Part directly queries the database, it doesn’t care about how the individual task lists are rendered (grouped or other). The only requirement is to use standard Tasks lists (not project tasks, custom lists or others).

      Your custom “project” column however will not be included in the query. For this you’ll need to become a Data View Web Part expert and build yours from scratch!

      • Ah, Task list, not Project Tasks. That was the problem. Worked like a charm when I switched those out. Made for a great presentation. Thanks Christophe!

  14. how can i show the original subsite for each task in the rollup? i have meeting workspace subsites and would like to show the incompleted tasks from each, but I can’t figure out which field to include

  15. Can we get the Tasks from Sub-Subsites with this webpart, like I have meetings site under root site in that meetings site i have few subsites. Can I get tasks from those sub-subsites?
    Because i was trying to use the regular OOB dataview webpart and using connect to another library option in designer nd trying to add the tasks list from the subsites. I was able to add from the subsites by staying at root site but not from Sub-Subsites.
    I am using MOSS 2007 and SPD 2007.

    • The Web Part works in crosslist mode, and will collect all the tasks from the current site and its descendants, no matter how many levels you have. Try it! It just takes a couple minutes to install it.

  16. Hi Christophe, I guess we have only this one, so I could’nt tell if the migration went well, do you have any other users comments on that *possible* incompatibility?

    • No, I don’t have any other users comments, but there are so many migration tools… Which one did you use? And did you ask the provider about DVWP upgrades?

  17. After investigating, here is how we got the thing to work in 2010: we created an empty data view in SPD2010, then copy and paste independantly the data source part and the XSL part of the SP2007 rollup webpart, and that was it!

    • Patrick and Christophe:

      If you’re doing a standard upgrade from 2007 to 2010 (if there is such a thing!), the DVWPs which you have in place in your pages *ought* to simply go along for the ride and also be in place in 2010. I doubt that anyone has a lot of experience upgrading 2007 instances that have a lot of DVWPs to 2010, but I’ve done some. All of the DVWPs in the installation upgraded fine in the database upgrade process. What I mean by this is the standard Microsoft database upgrade process, no third party tools involved.

      The DVWP in 2010 is identical to the one in 2010, so there shouldn’t be issues. The one place I saw a problem was where I had some CAML which wasn’t actually valid because it referenced a column which didn’t exist. In 2007, that DVWP rendered just fine. After the upgrade to 2010 the DVWP wasn’t visible in the page. By opening the page in SharePoint Designer 2010, I was able to see that the DVWP was actually still in the page, but marked as Hidden. I was able to fix the issue and display the DVWP again.

      Hope this is helpful.

      M.

    • John, This Web Part looks interesting. However, the main point of my solution is that it works out of the box, and doesn’t require any server side installation.

  18. Hi Christophe

    Thanks (again) for sharing your efforts with the community. I was wondering if you had updated your roll-up creator UI to allow specifying a specific list type (OOB or custom)?

    I am looking for a simple way to create roll-ups from a number of lists.

    Thanks once again?

    Paul

    • Unfortunately, it’s not that simple, as each list type has its own column names. To make it work for any list, you’ll need to learn how to build the roll-up in SharePoint Designer.

  19. Christophe, this is great but is there any way the Site Name can be identified or sorted on? I see the URL available but not the site name. Since some sites will have tasks named the same or with similar titles (Complete the Project Charter, e.g.), we need a way to distinguish which site the tasks are coming from.

    Thanks for all of your help.

    Rosemary

    • I am in the same boat, only having access to the URL, not the site name. The trick I used in my demos was to parse the URL to extract the site name.

  20. Hi, Cristophe. I ahve downloaded the webpart and added it to the gallery. However, when I attempt to plac eit on a page. I get an error saying it is not valid, to check that it is a .webpart or .dwp and that it contains well formed XML. What am I doing wrong?

    Thanks!

  21. Pingback: SPPD142 SharePointPodcast | SharePointPodcast

  22. Hi,
    I have install it in a french site and the webpart is not working. I read the comments of patrickemin and i saw that he managed to make it work. Could it be possible to get the code of the webpart or to explain a bit better how did he do it?
    thanks in advance
    .

Comments are closed.