How can I set default value for a lookup column (when we adding new item)? For lists creating I am using site columns and site content types in elements.xml.

I can set default value for text or date field type, but I can't find any way to do it for lookup column. I've find this article, but I don't want to use custom InfoPath forms. Is there any possibility to do it?

My site column elements.xml:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
       Description="Data Centre lookup" 
       Name="NewServer Datacentre"       
       DisplayName="Data Centre"       
       Group="Data centre">

I've tried to play with


but I also have not got any results.

The "1;#FirstDataCenter" is the correct string, I am succesfully using the identical string for setting list item value.

Thank you in advance.

  • what is wrong with the way you are doing it exactly? Just want to clarify what kind of solution you are looking for...
    – Zork
    Commented Mar 29, 2012 at 12:48
  • When I create new item, it "NewServer Datacentre" column doesn't fill in with the default value = "FirstDataCenter". Columns of other types filling in well.
    – MikhailSP
    Commented Mar 29, 2012 at 12:53
  • Is this for one list, or do you use the column in many lists? If its for a specific list you could easily just set it with javascript when the NewForm loads Commented Mar 29, 2012 at 13:10
  • Thank you for your answer Anders. I've found a more suitable for my needs solution. But your solution is also good.
    – MikhailSP
    Commented Mar 29, 2012 at 14:05

3 Answers 3


From the below blog, you can use the following code...

SPList docs = w.Lists["Documents"];
SPFieldLookup fl = (SPFieldLookup)docs.Fields["City"];
fl.DefaultValue = "1;#Mexico City";


  • 1
    Does not work for list, only for doc libs.
    – Evariste
    Commented Mar 15, 2016 at 18:23

I wrote a simple add-on(SharePoint Default Value Add-On), which inject a "default value" section into "Create Column" dialog.

enter image description here


Simplified - the first value for the column on the list you are referencing for your lookup should be a variation of "(a) Select". It's a kludge and you will probably want to do one of the options above to make it look elegant in the long run but it will get you past the initial problem so you can test your list.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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