Content Query WebPart (Recurring Calendar Events) on CodePlex!

by Admin 11/1/2008 11:10:00 AM

[UPDATE] If you have any functionality suggestions, please submit those via the CodePlex project site.  Or if you would like to take on enhancing it please let me know, I welcome the help :) 

Well, I finally got an opportunity to package this WebPart and make it available to the public.  There is definitely some work left, and it is an Alpha version.  The download includes the Visual Studio Solution, you can immediately build your WSP using cool tools like the WSPBuilder.

This WebPart allows you to display (you guessed it), recurring calendar events.  It also provides additional functionality. 

To learn more, go to the CodePlex workspace at http://www.codeplex.com/CQWPRCE
Enjoy!

Oscar

P.S.  I also welcome your feedback either via this blog entry, or the CodePlex project site url above!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

DataViews | CQWPRCE

CAML Query – Obtain items past due OR due in 21 days

by oscar 8/27/2008 5:02:50 AM

Was working on getting Tasks assigned to a user on a custom DataViewWebPart titled “My Critical Tasks”.  It is easy to obtain past due items, but sometimes you need both Past Due and due in X number of days.  I was battling (as with anything SharePoint) with this CAML query, but finally got this one to work. 

On my XSL I render an indicator image based on the date each Task has, looks something like this (FIGURE 1).  I enabled editing as well, so a user can edit the status of the task right from the home page and modify the Due Date, Status, and Notes if needed!

FIGURE 1 – Tasks shown based on the User that is currently logged onto the MOSS Site.

image

FIGURE 2 – Editing a Task on the WebPart

image

<Query>
  <Where>
   <And>
        <And>
             <And>
               <Geq>
                  <FieldRef Name='DueDate' />
                  <Value Type='DateTime'>
                     <Today OffsetDays='-21' />
                  </Value>
               </Geq>

                <Eq>
                   <FieldRef Name='AssignedTo' />
                   <Value Type='Integer'><UserID/></Value>
                </Eq>
             </And>
            <Neq><FieldRef Name='Status'/><Value Type='Text'>Completed</Value></Neq>
        </And>
      <Or>
        <IsNotNull>
            <FieldRef Name='Related_x0020_Event'/>
        </IsNotNull>
        <IsNotNull>
            <FieldRef Name='Related_x0020_Course'/>
        </IsNotNull>
     </Or>
  </And>
   </Where>
   <OrderBy>
      <FieldRef Name='DueDate' Ascending='True' />
   </OrderBy>
</Query>

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

CAML | DataViews | SharePoint Designer | WSS 3.0

SharePoint List Calculated Column - Calculate Business Days

by Oscar 6/23/2008 12:19:00 PM

Ran into a nice little scenario where my client wanted to know how many business days were remaining prior to a Task Due Date. Once I had this date, I built a nice DataViewWebPart (see Figure 3) with the SharePoint Designer! This is what I came up with, hope it helps you!

A) Create a calculated column; call it something like "Days Prior to Due Date" in my case.

b) Paste this value into a Calculated Column, formula
=(DATEDIF(Today,[Due Date],"d"))-INT(DATEDIF(Today,[Due Date],"d")/7)*2-IF((WEEKDAY([Due Date])-WEEKDAY(Today))<0,2,0)+1

C) Make the output type "Single line of text"

NOTE:
At the time of creating this calculated column, you must have another dummy column called "Today", it does not matter what data type it is. Once you create your calculated column, make sure to delete the Today column or your values will not work!

FIGURE 1 – Shows the formula for your calculated column to count only weekdays.

FIGURE 2 – Shows the sample Due Date and the calculated column output (far right)

FIGURE 3 – Shows you a dashboard with some XSL logic in the background to output an image on the left, and the days remaining calculated column value on the far right

Currently rated 3.0 by 1 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

WSS 3.0 | MOSS 2007 | Calculated Fields | SharePoint Designer | DataViews

Powered by BlogEngine.NET 1.2.0.0
Theme by Mads Kristensen

About Me

Oscar Medina I am a SharePoint Solutions Architect based out of San Francisco, California.
You can read more about me here

E-mail me Send mail
View Oscar Medina's profile on LinkedIn

Calendar

<<  November 2008  >>
MoTuWeThFrSaSu
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

View posts in large calendar

Recent comments

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008

Sign in