Paul's profilePaul Galvin's SharePoint...BlogListsSkyDrive Tools Help

Blog


    October 06

    Using "Person or Group" in a calculated column

    People commonly ask about using a column of data type "Person or Group" in another column of data type "Calculated".

    Bottom line, this does not work in WSS 3.0 (or MOSS).

    When adding a calculated column, WSS shows the list of fields it allows you to use for the calculation.  If you type in the name of a column that is not in its list, it tells you:

    One or more column references are not allowed, because the columns are defined as a data type that is not supported in formulas.

    Workaround: Use an event handler.  The event handler fires when the user saves the item.  It performs the update you would have wanted the calculated column to do for you.

    Useful links on calculated fields in general:

    Quick disclaimer: I believe the above to be true and accurate, but I've seen enough clever tricks here and there in MOSS/WSS that I wouldn't be extremely surprised (agog if you will) if someone has figured out a way to do this without resorting to code.  If you've figured out clever work-around or know someone that did, please let me know!

    Comments (4)

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    JDwrote:
    This is quite surprising -- being able to count or manipulate person information in a calculated column would be quite useful, and it's disappoint to see a suggested work around being the deployment of custom code. I hope this is changed in the next version of Sharepoint.

    Thanks for the information, Paul!
    Jan. 15
    Dec. 16
    Abhilashwrote:
    Please let me know if you have got any workaround for Using "Person or Group" in a calculated column without using code..
    May 15
    Vincewrote:
    So how do we use an event handler?
    Oct. 26

    Trackbacks

    The trackback URL for this entry is:
    http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!208.trak
    Weblogs that reference this entry
    • None