How do I populate a “Lookup” field via Elements.xml?

The schema.xml will look like:

  <Field Name=”Achievements” ID=”{3e69c1-b538-497b-a7f6-8b4388b8e}” DisplayName=”Achievements” Type=”Lookup” Format=”Dropdown” List=”Lists/Achieve_List” ShowField=”Achieve” >

The elements.xml will look like:

<Field Name=”Achievements”>1</Field>

OR (or if it’s a multiple value lookup field it will look like)

<Field Name=”Achievements”>1;#;#2;#;#3</Field> 

Leave a Reply

Your email address will not be published. Required fields are marked *