Stump the Panel » Q&A on "Data View Web Parts" Workshops

DVWP to display "today's events" pulling from 2 calendars

(4 posts)
  • Started 2 months ago by NancyCentury
  • Latest reply from paltomonte
  1. NancyCentury
    Member

    There are 2 calendars holding different types of event data on my site. I want to provide a "Today's events" data view that displays the event name and start time/end time of each item so that all events falling on the current date are listed in one web part.

    I thought I could merge the 2 calendars' data into a single new linked source in SPD and create my DVWP off this, but it is not working.

    I am also stuck on filtering for "today" both when the event's actual start date = today AND when it's a multi-day event and "today" is included in the relevant date range.

    Posted 2 months ago #
  2. Calendar lists are a problem child when it comes to aggregation such as you describe.

    One of the biggest problems is the way that recurring items are actually stored. In MS Outlook (or other PIM apps) when you create a recurring appointment a separate occurrance is actually created in the calendar. So, you might assume this is the case with SP calendars. Oh, contraire...

    There is actually only a single list item created with the original event start and end times. Then properties are added to this list item that include the reoccurance data. A calendar view can interpret this metadata and display the appropriate entries on a calendar view. However, there is only one list item.

    So, when you attempt to filter or sort your results will be based on the dates/times of the very FIRST instance of your recurring event. Only when you customize one of the occurances will it be created as a separate list item. Even then, if you change the original reoccuring event this list item will be deleted in favor of the metadate interpreted as the view.

    As for aggregating multiple calendars into a single DVWP, that can be done, but it only shows as a list. Without a lot of custom code, you really can't get it to look like a calendar.

    There are a couple of nice 3rd-party calendar aggregators but most of them only do what you could do with the DVWP and conditional formatting. If you want a more rich and fulfilling experience try the Virto Ajax Web Part Calendar for SharePoint. They have an eval version you can try at http://www.virtosoftware.com/. And the full version is not pricey at all. It's very slick.

    Good luck.

    Posted 2 months ago #
  3. NancyCentury
    Member

    I don't care that it won't look like a calendar- I knew that would be the case in using a DVWP. There will only be a few items showing at a time anyway, so it actually makes sense to have it in list form anyway.

    Is there any more guidance you could provide in terms of using a DVWP for this?

    Posted 2 months ago #
  4. paltomonte
    Member

    thanks Kevin - I had put together a 'Today's Events' DVWP a while back and wasn't aware of the recurring items. I'll have to see if there's any way around that

    Posted 2 months ago #

RSS feed for this topic

Reply

You must log in to post.