User Voices
(Loading...)
Our blog on SharePoint add-ons and solutions development
« How to do PeopleZen CSS Customizations | Main | Month and Year Drop-Downs for Advanced Date Range Filtering in SharePoint »
Monday
Dec282009

An 'Upcoming Birthdays' Web Part in 10 minutes

Who doesn't love birthday calendars? So let's add one to your team site! Out of the box, SharePoint does not offer much help with that assignment. What are your options?

  • Approach 1: create Your Very Own Birthdays List and commence with your data entry. Problems: your birthdays are likely readily available in Active Directory and/or your SharePoint user profiles, and duplicating them is a waste and not feasible for organizations of significant head count. Furthermore, keeping the list filtered to show, say, the next 14 days only is non-trivial. Try it, and come back here once you've had enough (of calculated Columns that fail to properly understand the Today variable, and of the ensuing Data View Web Part XSLT-fu).
  • Approach 2: develop Your Very Own Birthdays Web Part from scratch. Great if you love programming (we certainly do) and have time to spare (we envy you!). Problems: a real Time Sink once you get into the particulars of SharePoint Server's user profiles stores, plus all custom code you write is code you'll have to maintain, support, bug-fix and upgrade for all eternity.
  • Approach 3: accomplish it in less than 10 minutes, using only our two most popular and really easy to deploy Web Parts, PeopleZen and FilterZen. Problems: you'd really like to avoid 3rd-party add-ons and wouldn't it be nice to be able to do it out of the box? In an ideal world, maybe. Right now, we invite you to try what we consider the most time-efficient approach using only two proven, tested, usable and supported components.

So we want to list the birthdays coming up in the next 14 days...

On your Web Part Page, switch to Edit mode from the Site Actions menu and add the following two Web Parts:

If they're missing in your environment, simply download and deploy their corresponding Solution Packages for free.

Configuring the User Profiles Web Part

This is the easiest part. From the PeopleZen Web Part menu, choose Modify Web Part. In the tool pane, scroll down to the Filtering section and tick the check box labelled Ignore year when filtering by date-time range properties:

Connecting the Filter Web Part

At this point, it's a good idea to connect the Filter Web Part to the User Profiles Web Part. From the PeopleZen Web Part menu, choose Connections / Get Filters From and pick the filter provider Web Part:

Configuring the Filter Web Part

From the FilterZen Web Part menu, choose Modify Web Part. Scroll down to the Advanced Filtering Settings section and make sure the following settings look exactly like in this screenshot:

Scroll back up to the All Filters section and from the drop-down list of filter types, select Date Filter:

Click the '+' plus icon to actually add a Date Filter to the Filter Web Part. You will see a different tool pane for editing your new Date Filter:

Use the name and the default value illustrated above. Now scroll down a bit and expand the Advanced Filter Properties section. Scroll down again and pick the greater than or equals to operator:

Click Apply to return to the Filter Web Part settings tool pane. Now add a second Date Filter, configured exactly like the first one, with only two crucial differences:

  • In the Advanced Filter Properties section, choose the less than or equals to operator.
  • In the Date Filter Properties section, enter 14 in the text box labelled Always add N days to the date filter value.

That is, if you want the filtered User Profiles Web Part to only consider birthdays:

  • between "Today" (that's what the first Date Filter named SPS-Birthday defined)
  • and "14 days from Today" (that's what the second Date Filter named SPS-Birthday defined)

That's it!

Save your Filter Web Part changes, reload the Web Part Page and you will only see those user profiles whose birthday falls within the next two weeks — if there are any. To verify that this works, you can of course experimentally broaden your date range.

Next up: an 'New Collegues / Recent Hires' Web Part in 1 minute...

Of course, there's nothing stopping you from applying and varying those principles to other requirements. A related real-world scenario: listing new employees.

  • Instead of SPS-Birthday, you'd use SPS-HireDate throughout.
  • Instead of "equals Today" and "less than Today+14", you'd use "greater than Today-14" and "equals Today", in that order.

Reader Comments (46)

I need to display the Birthdays, Anniversaries, and new hires in Monthly basis, means,

The webpart supposed to display only this month birthdays, Anniversaries and New hires. Its very urgent. Can you please help me out???????

October 30, 2010 at 1:45 | Unregistered CommenterSrikanth

Sure we can. We just uploaded yesterday the newest PeopleZen build 1.7.5.5 now available for download via this web site.

Now, for the kind of "monthly events" / dates-this-month you want to filter by, in the PeopleZen Web Part's settings tool-pane under the Filtering section, tick BOTH the Ignore year when filtering by date range properties (such as hire date or birthday) for annually recurring dates AND Ignore day when filtering by date range properties (such as hire date or birthday) for "any date in month X" check-box options.

Now any date filter value sent to the PeopleZen Web Part, whether via FilterZen or another filter provider Web Part, will be checked only for its month. If you send the date value 31st October 1961, then with both ignore-year and ignore-day options active all user profiles will be shown where the user profile property date value is any date set in the month of October.

October 31, 2010 at 6:55 | Registered CommenterROXORITY

Can you provide updated instructions for the newest version of filterzen? The screenshots seem to indicate an older version of the software. I am running SharePoint 2010 Server.

I tried to follow the instructions, by some things are not clear, like the filtering mode (CAML direct or Classical). Also the advanced filtering settings are different. I think I am support to tick "On pages with nothing but a single List View, automatically filter it connectionless (uses CAML Direct filtering mode), but I am not sure.

Thank you very much in advance!

November 2, 2010 at 4:13 | Unregistered CommenterAarona

> On pages with nothing but a single List View

No you should not activate that. Generally speaking simply keep all settings set to their defaults unless you 100% KNOW that you need them. What makes you think you need CAML Direct filtering mode? Sure this was needed for a scenario such as "birthdays in the next 10 days" because then you need two date filters, one birthday>=today AND another one birthday<=today+10 -- simply speaking.

For "birthdays this month" you don't need this. Simply add a single date filter to FilterZen. Specify its default value as Today and its name as SPS-Birthday. Connect to PeopleZen and tick both its "ignore year" and "ignore day" check-box options in the Filtering section of the PeopleZen Web Part's settings tool-pane. Done.

You may have overconfigured / malconfigured your FilterZen Web Part by now. Delete it, add a new one from scratch before applying the above instructions.

November 2, 2010 at 7:30 | Registered CommenterROXORITY

Thanks for the response.

I only see the option to untick "Ignore year when filtering by date range properties". I can't find a place to ignore the month in PeopleZen. Is ignore month in another section of the tool pane?

November 3, 2010 at 4:00 | Unregistered CommenterAarona

I never mentioned an "ignore month" option. There is an ignore-year and an ignore-day (the latter only in the newest build uploaded 1-2 days ago). The two options are next to each other, ie ignore-day is right under ignore-year. If this is not so in your environment, you have an outdated PeopleZen build installed, then simply re-download and re-install.

That is, if you need ignore-day. There is no ignore-month.

Ignore-day plus ignore-year is what you want if you want to show "dates in month X" --- ie in a specific month, no matter their individual year or day. Does this make sense?

Ignore-month would mean "dates on each 2nd" or "dates on each 12th" AND "dates in 2009" or "dates in 1982" no matter their month. Is this really what you need?

November 4, 2010 at 9:29 | Registered CommenterROXORITY

Thank you, thank you, thank you! I meant day, not month. Sorry for the confusion. I went ahead and downloaded the newest version of PeopleZen. After upgrade, I had the option of ticking "ignore day", along with "ignore year".

I am all set. What a great product!

November 4, 2010 at 13:08 | Unregistered CommenterAarona

Can FilterZen filter a list of brithdays?

I have a custom list with Employee name, and DOB columns. I want to show only this current weeks bithrdays. So I want to ignore the year. Can this be accomplished?

November 4, 2010 at 20:58 | Unregistered CommenterPaul

Paul -- the above tutorial is for PeopleZen but you can use it for a List, too, starting with the Configuring the Filter Web Part paragraph. In essence, you have two Date Filters with the same name (DOB or whatever the internal name of your Birthday column is).

The first date filter defaults to the value Today and has its operator set to greater-or-equals.

The second defaults to the value Today, but right below that default you specify "add 7 days to the date filter value". Its operator is set to less-or-equals.

This gives you "birthdays in the next 7 days" (birthdays greater-or-equals today and less-or-equals today-next-week).

It is crucial that CAML Direct filtering mode is enabled for the FilterZen Web Part AND that under Filter names whose multiple values should be AND-combined you specify the single name shared by both of your date filters, in your case presumably DOB.

November 5, 2010 at 7:52 | Registered CommenterROXORITY

Hi,
I cant make birthday filter on days
If I set +10 days and current date is 22.12.2010 I dont get nothing in People zen even there is 2 users on 22.12 and on 27.12
I think Its because my filter is on 22.12.2010 >=today AND another one birthday<= 1.1.2011
How can I fix this issue.It works only per month nicely.

December 20, 2010 at 19:09 | Unregistered CommenterEric

Hi Eric, since you also emailed us directly about this we'll deal with it via email.

December 20, 2010 at 23:05 | Registered CommenterROXORITY

Hello All,
Due to a situation out of my control, I had to place our employee birthday information in another AD field called "employeeID". Is it possible to create a filter on this field instead of using the SPS-Birthday AD field? The "employeeID" field is just a string value with data formatted like this "MM/dd" no year defined.
Thanks for any help!
-Brock

January 13, 2011 at 23:09 | Unregistered CommenterBrock Mynhier

Hi Brock,

SPS-Birthday is not an AD field, it is a SharePoint field. If you do have an AD field called employeeID containing birthday data, why don't you change your SharePoint's User Profile Import feature to add a mapping from employeeID to SPS-Birthday so that during the next (manual or scheduled) profile import the built-in birthday field gets populated by your AD employeeID data? I suggest you give that a try.

January 14, 2011 at 1:27 | Registered CommenterROXORITY

Thanks for the post. Followed it to the letter but i keep getting this error: "No field "SPS-Birthday" defined for "User Profile Data Source".
What might be the cause of this?

Thanks in advance

June 8, 2011 at 20:25 | Unregistered CommenterKodjo Frimpong

What is the "Connection Provider" for this Data Source? You can find this under Site Settings / PeopleZen Studio / Data Sources / (your data source)

SPS-Birthday is only valid for "Farm User Profiles" Data Sources under SharePoint (2007 or 2010) *Server* -- other connection providers have other names for that field.

June 8, 2011 at 21:04 | Registered CommenterROXORITY

Thanks for the prompt response; i'm using "Site User Accounts (People and Groups)" as my connection provider

June 8, 2011 at 22:23 | Unregistered CommenterKodjo Frimpong

SharePoint 2007 (WSS) or 2010 (SPF)?

June 9, 2011 at 17:54 | Registered CommenterROXORITY

I'm using SharePoint Server 2010 (SPF)

June 9, 2011 at 22:02 | Unregistered CommenterKodjo Frimpong

There is no built-in Birthday column in SPF "Site User Accounts". The built-in user columns in SPF are:

Account, Name, Work e-mail, Mobile phone, About me, Picture, Department, Title, SIP Address, First name, Last name, Work phone, User name, Web site, Ask Me About, Office.

You can add your own Birthday column as follows:

- open http://yoursite/_catalogs/users

- the top breadcrumb reads "(Site title) > User Information List > Detail View". Drop down the "Detail View" menu and choose "Modify this view"

- the top breadcrumb now reads "(Site title) > User Information List > List Settings > Edit View". Click the "List Settings" link.

- click "Create column" and use "Birthday" as the name for your new column, "Date and time" (then "date only") for its column type.

- instead of SPS-Birthday you use "Birthday" (without quotes) in PeopleZen for the steps in this tutorial

- note the Birthday column will also need to be populated correctly with the actual birthdays for your users in order to make this work.

June 9, 2011 at 22:32 | Registered CommenterROXORITY

I'm having the same problem as Kodjo above but i'm using SharePoint Server 2010, i followed the steps but end up with the "No field "SPS-Birthday" defined for "User Profile Data Source" error

June 10, 2011 at 18:14 | Unregistered Commenterkwame

Well... IS there a Birthday field shown under Central Administration / Manage Service Applications / User Profile Service Application / Manage User Properties??... is it enabled too?...

June 11, 2011 at 5:53 | Registered CommenterROXORITY

Everything in the user profile service app is in order (including the Birthday property), what i just discovered is that the Farm Data Source option is not available as a connection provider. I redeployed the solution but the problem persisted.

June 13, 2011 at 19:39 | Unregistered Commenterkwame

Whoa. OK in this case it sounds like you have the wrong PeopleZen WSP solution package installed... did you use our "Deploy" setup wizard or perform a manual deploy with stsadm or similar?

If wizard: perform a full uninstall and then a full reinstall, when it asks you whether the farm is WSS/SPF or MOSS/SPS do make sure MOSS/SPS is answered!

If manual WSP deploy: use roxority_PeopleZen_xiv.wsp, none of the 3 other ones.

June 14, 2011 at 2:22 | Registered CommenterROXORITY

Thank you very much! Seems i deployed the wrong package. I deployed the correct package and all is working fine.
Really cool web part!!!

June 14, 2011 at 18:00 | Unregistered Commenterkwame

I have connected my sharepoint 2010 user profiles to a bdc connection and am importing more fields to use. I have imported a birthday field to sharepointbut did not map it to the Birthday field because it is a string field and would not let me. This is a result of the database it is coming from which I have no control over, unfortunately. Now I need to display the next two weeks of birthdays and can't seem to figure out how to parse the string field to display the month and day. How can I get it to display the date under the employee name but have it parsed to look like dd/mm from 6/15/1964 12:00:00 AM? Any suggestions would be appreciated.

June 17, 2011 at 23:32 | Unregistered CommenterMichelle

If the field name contains birthday PeopleZen should automatically figure out from the data that this is a date/time value and birthday filtering should work as usual. Have you already tried our standard steps for birthday filtering?

Regarding the reformatting to dd/mm, we'll get back to you on that here shortly. Basically this would be accomplished with the Site Settings / PeopleZen Studio / Data Field Templates feature but we need to test this out ourselves in detail first. Results to follow within 2-4 days.

June 18, 2011 at 0:23 | Registered CommenterROXORITY

Thanks for the quick response. Yes I have created the birthday webpart per your guide and it works great. I am getting this for the result: 6/18/1951 12:00:00 AM. Thanks.

June 18, 2011 at 1:40 | Unregistered CommenterMichelle

Do we have to display the field title? I cannot seem to figure out how to have the field display without some column or field name. Is it possible to not show it?

June 20, 2011 at 21:37 | Unregistered CommenterMichelle Gilbert

This might help you out here.

June 22, 2011 at 6:07 | Registered CommenterROXORITY

Yes this is perfect. Thank you.

June 23, 2011 at 2:52 | Unregistered CommenterMichelle Gilbert

Hi There,
The webpart is showing the date in US format, e.g. Month Date, just wondering whether there is a way to change the display format same as my servers local? in my case it is Date Month. Many thanks

August 31, 2011 at 8:15 | Unregistered Commenteruspepper

Hm, it *should* use your locale format! Be sure to also check both the Site Settings / Regional Settings page for your site and your (or your users') My Settings / Regional Settings pages though.

September 5, 2011 at 4:28 | Registered CommenterROXORITY

Hi, thanks for the reply, but unfortunately, all my reginal settings are set to en-au correctly and the webpart shows the date in en-us format. Any suggestion?
Many thanks

September 6, 2011 at 9:34 | Unregistered Commenteruspepper

Actually this is a special case... SharePoint always requires people to enter their birthday in "Month Day" format on their Edit Profile page, it seems. Now all we do is simply display what's stored in the User Profiles DB.

September 7, 2011 at 6:07 | Registered CommenterROXORITY

I can't get the filters to exclude dates that have already passed. It displays all birthdays for the rest of the year (September through December). Since SP holds the bithdays in "Month Day" format, should I be adding something to the "Format for date values sent" field, right above the Advanced Filter Properties link?

September 14, 2011 at 7:47 | Unregistered CommenterMarshall

Best to email us your FilterZen Web Part (via its web part menu / Export option), there's probably something off with your Date filters. The techniques presented throughout this page do work in production for all who implemented them.

September 15, 2011 at 6:56 | Registered CommenterROXORITY

Hi - after our migration from 2007 to 2010, our nirthdays web parts (PeopleZen + FilterZen, configured as described above) no longer work (we see "no user profiles to show in this view."). We've uninstalled/reinstalled, deleted the parts and recreated them from scratch, and gotten the same result. Can you help us figure out where to start troubleshooting?

October 13, 2011 at 4:32 | Unregistered CommenterEric

With no filter web part connected you DO see all profiles?

Can you email us exports of both FilterZen + PeopleZen Web Parts (via web part menu / Export option).

October 13, 2011 at 5:38 | Registered CommenterROXORITY

Yes, we see all profiles with no filterzen part connected. Where should I send the .zip file with the exported FilterZen/PeopleZen parts?

November 22, 2011 at 3:20 | Unregistered CommenterEric

Hi Eric, I believe you know our email addresses since we've been in touch a few times for support requests, but you could use the one listed in our footer (info@roxority.com) or support@roxority.com or even anything-you-like@roxority.com -- we'll work with your choice!

November 22, 2011 at 6:36 | Registered CommenterROXORITY

Adding Today in date picker for current date (Birthday web part) is not working for me.But if i specify 12/2/2011 working fine .
How do i display people with today's birthday?. This one is urgent..

December 2, 2011 at 20:51 | Unregistered CommenterFaseela

Might be due to locale / regional settings issues. Can you email us the details of your setup?

December 6, 2011 at 12:12 | Registered CommenterROXORITY

Hi there. Are there screenshots anywhere that show the web part in use ... in other words, the final product after it's configured and connected to Active Directory? I'd like to see how it actually displays on the SharePoint 2007 site. Thanks in advance!

February 7, 2012 at 12:29 | Unregistered CommenterAaron

Hi!
I have a problem with birth dates in the "upcoming birthdays" list made with peoplezen+filterzen.
most (not all) of dates of the list are moved 1 day before real date.
in the same time user profile page shows right date.
and i can't understand why some dates looks right in the list.

when i use only peoplezen (without filterzen connected) dates moves the same 1 day before.
so it looks like something wronge with peoplezen...

ps: it works on srv2008r2sp1+spf2010 with all servicepacks, all is russian.

February 20, 2012 at 0:05 | Unregistered CommenterYoshiToshi

Hi,
I want the webpart to be in my homepage, and will show birthdays from a list named "Employees", which contains a column named "Day of birth". Is it possible? cause I cant figure out how to do that.
Thanks,
Lena.

July 8, 2012 at 20:11 | Unregistered CommenterLena

Aaron, here are our screenshots.

YoshiToshi, best to email us exports for your PeopleZen + FilterZen Web Parts here (via web part menu / Export option).

Lena, no need for PeopleZen here, just use the out-of-box List View Web Part since your Employees are stored in a List (but then, we'd advise using User Profiles rather than a single List residing inside an individual SharePoint Site)...

August 28, 2012 at 10:38 | Registered CommenterROXORITY
Member Account Required
You must have a member account on this website in order to post comments. Log in to your account to enable posting.