Situation: Attempting to create a conference room calendar. I've created a calendar and enabled resource reservation. A 'new event' form allows users to select resources (rooms in this case).

Question: Is it possible to have it so users can only select one resource? Or even do some type of data validation?

Unlike most lookup columns, I can't seem to modify the column setting to allow only single choice.


  • I have exactly the same requirement as yours. I'll work on it and get back here for what I'll have come up with
    – MdMazzotti
    Feb 7, 2014 at 18:24

1 Answer 1


After some deep investigation, I can confirm the following:

  • the resource field (SPFieldFacilities) is a special type of SPFieldLookup (it derives from it) and the AllowMultipleValues flag is internally set to true and cannot be modified through the UI. It could be modified via PowerShell, and it would behave like a normal lookup field, but the Check Double Booking feature wouldn't work anymore.
  • if you only want to force it to allow only one selection (even though I believe that's not the full story and what you really need is to forcibly set it to some value...at least, this is my scenario, but I digress -I'll blog about this sooner or later), then the solution involves a hack as dirty as hell, which is hijacking one of the javascript function that takes care of handling the two select list boxes events (I'm referring to the two boxes next to the Add/Remove buttons)

The function to overwrite is GipAddSelectedItems and the following is the amended code you'll want to insert in the NewForm.aspx page, preferably inside the content place holder with ID PlaceHolderBodyAreaClass:

GipAddSelectedItems = function (master)

// HACK *********************************************************
// remove all the selections from the box on the right
for(var i=0; i <  master.resultControl.options.length; i++){ 
    master.resultControl.options[i] = null;

var handler=master.addControl.getAttribute("onbeforeadd");
    if (handler !=null && handler !="")
        if (!eval(handler+"(master)"))
    var needToAdjustResultBox=false;
    if (master.resultControl.offsetWidth < master.candidateControl.offsetWidth)
    var dirty=false;
    var pos=-1;
    for (var i=0; i < master.candidateControl.options.length; i++)
        if (master.candidateControl.options[i].selected)
            if (!dirty)
            master.resultControl.options[master.resultControl.length]=              GipNewOption(
            // HACK **********************************************************  
            // never remove items from the candidate box (the one on the left)
            // as we don't remove anything anymore, no need to decrement
            // ***************************************************************
    if (dirty)
        if (pos >=0)
    if (handler !=null && handler !="")
  • This can by bypassed by holding shift when selecting. Is there a better solution?
    – Eitan K
    Jun 21, 2016 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.