Jan Tielens' Bloggings

Joy, frustration, excitement, madness, aha's, headaches, ... codito ergo sum!

  • SharePoint Feature: Add Column from Existing Site Columns menu item

    Question: what is the easiest way to add a column to a list or document library in SharePoint 2007?
    Answer: navigate to the list, from the Settings menu, choose Create Column.

    Question: how do you add an existing Site Column to a list or document library?
    Answer: navigate to the list, from the Settings menu, choose List/Document Library Settings, scroll down to the Columns section and click Add from existing site columns.

    In the beta versions of SharePoint 2007 there was an easier way to add an existing Site Column to a list or document library because there was another menu item in the Settings menu: Add column from existing site columns. For those of you who are nostalgic about the beta's of Office 12, and want to have the menu item back: I've created simple feature to add the menu item:

    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="
    http://schemas.microsoft.com/sharepoint/">
        <CustomAction
            Id="{F32CD702-0391-4b55-A8D6-7653650DEF95}"
            Location="Microsoft.SharePoint.StandardMenu"
            GroupId="SettingsMenu"
            RegistrationType="List"
            Sequence="0"
            ImageUrl="_layouts/images/menuaddcolumn.gif"
            Title="Add column from existing site columns"
            Description="Add an existing site column to store additional information about each item."
            Rights="ManageLists"
            >
            <UrlAction
                Url="javascript:window.location= '{SiteUrl}/_layouts/AddFieldFromTemplate.aspx?List={ListId}&amp;Source=' + window.location"/>
        </CustomAction>
    </Elements>

    The feature uses the Javascript tric which I explained yesterday (this feature was actually the reason for it). If you want to download the complete feature, packaged in a nice SharePoint Solution (WSP); just click here!

    Here's a screenshot of the result:

  • Using the Current Page URL in the UrlAction of a SharePoint Feature

    With the introduction of the feature framework in SharePoint 2007, developers have some great opportunities to customize and enhance nearly everything in SharePoint. One of the things that's quite easy to do with the help of a feature, is to add and/or replace functionality in the web user interface of SharePoint site. This was typically very hard to do (in a nice way) for the previous version of SharePoint (remember having to edit a javascript file to add a menu item in the ECB?).

  • The Book: Real World SharePoint 2007

    Two weeks ago the book Real World SharePoint 2007: Indispensable Experiences From 16 MOSS and WSS MVPs became available, I had the honour to work with a bunch of really smart guys and girls to create this book. There are 16 chapters in this book, all written by a SharePoint MVP based on his/her personal experiences and expertise. My chapter dives into web part development, the basics of web part development are covered as well as advanced scenarios like connectable web parts and the SmartPart.

  • Let's get started again!

    Wow, it has been a long time since my last post, five months to be precise! So it's about time to get started again... my colleagues have been bugging me a lot lately.

  • Welcome Fran!

    I haven't blogged a lot since two weeks, but this time there's a reason: last week I became the very proud father (1st time!) of our beautiful daughter Fran. Last week was very hectic but now everything is stabilizing (at least that's what I hope); she is getting to know us and we are getting to know her habits. Everything they say about having children is true: it changes your life ... instantaneously and dramatically. But she is so beautiful, for more pictures check her "blog" (created in WSS v3 of course), it's in Dutch only.