I'm deploying a document library by feature. For this, i created a list definition and a list instance into a vistual studio solution. Additionally a second empty custom list is deployed.
Now i want to add one more column to the document library, which should do a lookup on my custom list (Field title).
For this i edited the schema.xml and added ine second field
<Field ID="{0cbf79c7-2f23-4c55-9bea-940e58d85f33}" Type="Lookup" Name="Department" DisplayName="Kategorie" SourceID="http://schemas.microsoft.com/sharepoint/v3" Required="TRUE" List="Lists/RI.XXX.IntranetSP2010.DepartmentDocument" FieldRef="ID" ShowField="Title" />
This seems to deploy without an error message. Somehow Visual Studio also created some files 'EditDlg.htm', 'FileDlg.htm', 'Repair.aspx' next to my Schema.xml.
Unfortunately there is no Drop-Down-Field on Uploading a new File, rather than editing properties. Not in the Upload-Dialog, and not in the following Set-properties Dialog.
Can anyone help me out? I'm getting crazy with this ;-)
Here is my complete Schema.xml, it it could help:
<?xml version="1.0" encoding="utf-8"?>
<List xmlns:ows="Microsoft SharePoint" Title="RI.XXX.IntranetSP2010.SiteDocuments" Direction="$Resources:Direction;" Url="RI.XXX.IntranetSP2010-SiteDocuments" BaseType="1" xmlns="http://schemas.microsoft.com/sharepoint/">
<MetaData>
<ContentTypes>
<ContentTypeRef ID="0x0101">
<Folder TargetName="Forms/Document" />
</ContentTypeRef>
<ContentTypeRef ID="0x0120" />
</ContentTypes>
<Fields>
<Field ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Type="Text" Name="Title" ShowInNewForm="FALSE" ShowInFileDlg="FALSE" DisplayName="$Resources:core,Title;" Sealed="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Title"></Field>
<Field ID="{0cbf79c7-2f23-4c55-9bea-940e58d85f33}" Type="Lookup" Name="Department" DisplayName="Kategorie" SourceID="http://schemas.microsoft.com/sharepoint/v3" Required="TRUE" List="Lists/RI.XXX.IntranetSP2010.DepartmentDocument" FieldRef="ID" ShowField="Title" />
<Field ID="{4b1bf6c6-4f39-45ac-acd5-16fe7a214e5e}" Type="Text" Name="TemplateUrl" DisplaceOnUpgrade="TRUE" DisplayName="$Resources:core,Template_Link;" XName="TemplateUrl" Filterable="TRUE" Sortable="TRUE" Hidden="TRUE" FromBaseType="TRUE" PITarget="mso-infoPathSolution" PIAttribute="href" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="TemplateUrl"></Field>
<Field ID="{cd1ecb9f-dd4e-4f29-ab9e-e9ff40048d64}" Type="Text" Name="xd_ProgID" DisplaceOnUpgrade="TRUE" DisplayName="$Resources:core,Html_File_Link;" XName="ProgID" Filterable="TRUE" Sortable="TRUE" Hidden="TRUE" FromBaseType="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="xd_ProgID"></Field>
<Field ID="{fbf29b2d-cae5-49aa-8e0a-29955b540122}" Type="Boolean" Group="_Hidden" Name="xd_Signature" DisplaceOnUpgrade="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="xd_Signature" DisplayName="$Resources:core,Xml_signed;" XName="{FBF29B2D-CAE5-49aa-8E0A-29955B540122}" Filterable="TRUE" Sortable="TRUE" Sealed="TRUE" Hidden="TRUE" FromBaseType="TRUE" ReadOnly="TRUE"></Field>
<Field ID="{e52012a0-51eb-4c0c-8dfb-9b8a0ebedcb6}" ReadOnly="TRUE" Type="Computed" Name="Combine" DisplaceOnUpgrade="TRUE" DisplayName="$Resources:core,Merge;" Filterable="FALSE" Sortable="FALSE" Hidden="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Combine">
<FieldRefs>
<FieldRef Name="FSObjType" Key="Primary" />
<FieldRef Name="EncodedAbsUrl" />
<FieldRef Name="TemplateUrl" />
</FieldRefs>
</Field>
<Field ID="{5d36727b-bcb2-47d2-a231-1f0bc63b7439}" ReadOnly="TRUE" Type="Computed" Name="RepairDocument" DisplaceOnUpgrade="TRUE" DisplayName="$Resources:core,Relink;" Filterable="FALSE" Sortable="FALSE" Hidden="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="RepairDocument">
<FieldRefs>
<FieldRef Name="FSObjType" Key="Primary" />
<FieldRef Name="ID" />
</FieldRefs>
</Field>
</Fields>
<Views>
<View BaseViewID="0" Type="HTML" MobileView="TRUE" TabularView="FALSE" FreeForm="TRUE">
<Toolbar Type="Standard" />
<XslLink Default="TRUE">main.xsl</XslLink>
<RowLimit Paged="TRUE">30</RowLimit>
<ViewFields>
<FieldRef Name="DocIcon"></FieldRef>
<FieldRef Name="LinkFilenameNoMenu"></FieldRef>
<FieldRef Name="Department"></FieldRef>
<FieldRef Name="Editor"></FieldRef>
</ViewFields>
<ParameterBindings>
<ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noitemsinview_doclibrary)" />
<ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noitemsinview_doclibrary_howto)" />
<ParameterBinding Name="AddNewAnnouncement" Location="Resource(wss,Add_New_Document)" />
<ParameterBinding Name="MoreAnnouncements" Location="Resource(wss,MoreDocuments)" />
</ParameterBindings>
<Query>
<OrderBy>
<FieldRef Name="Modified" Ascending="FALSE"></FieldRef>
</OrderBy>
</Query>
</View>
<View BaseViewID="1" Type="HTML" WebPartZoneID="Main" DisplayName="$Resources:core,All_Documents;" DefaultView="TRUE" MobileView="True" MobileDefaultView="True" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/images/dlicon.png" Url="Forms/AllItems.aspx">
<Toolbar Type="Standard" />
<XslLink Default="TRUE">main.xsl</XslLink>
<RowLimit Paged="TRUE">30</RowLimit>
<ViewFields>
<FieldRef Name="DocIcon"></FieldRef>
<FieldRef Name="LinkFilename"></FieldRef>
<FieldRef Name="Department"></FieldRef>
<FieldRef Name="Modified"></FieldRef>
<FieldRef Name="Editor"></FieldRef>
</ViewFields>
<ParameterBindings>
<ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noitemsinview_doclibrary)" />
<ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noitemsinview_doclibrary_howto2)" />
</ParameterBindings>
<Query>
<OrderBy>
<FieldRef Name="FileLeafRef" />
</OrderBy>
</Query>
</View>
<View BaseViewID="2" Type="HTML" FileDialog="TRUE" TabularView="FALSE" DisplayName="$Resources:core,File_Dialog_View;" Hidden="TRUE" Path="filedlg.htm" ModerationType="Moderator">
<Toolbar Type="Standard" />
<ViewFields>
<FieldRef Name="DocIcon"></FieldRef>
<FieldRef Name="BaseName"></FieldRef>
<FieldRef Name="Department"></FieldRef>
<FieldRef Name="Editor" TextOnly="TRUE"></FieldRef>
<FieldRef Name="Modified" TextOnly="TRUE"></FieldRef>
</ViewFields>
<Query>
<OrderBy>
<FieldRef Name="FSObjType" Key="Primary" />
<FieldRef Name="FileLeafRef" />
</OrderBy>
</Query>
</View>
<View BaseViewID="3" Type="HTML" WebPartZoneID="Main" DisplayName="$Resources:core,Explorer_View;" TabularView="FALSE" Url="Forms/WebFldr.aspx" SetupPath="pages\webfldr.aspx" RequiresClientIntegration="TRUE" ReadOnly="TRUE">
<Toolbar Type="Standard" />
<XslLink>main.xsl</XslLink>
<ViewFields />
<ParameterBindings>
<ParameterBinding Name="NoAnnouncements" />
</ParameterBindings>
</View>
<View BaseViewID="6" Type="HTML" TabularView="FALSE">
<Toolbar Type="Standard" />
<XslLink Default="TRUE">main.xsl</XslLink>
<RowLimit Paged="TRUE">30</RowLimit>
<ViewFields>
<FieldRef Name="DocIcon"></FieldRef>
<FieldRef Name="LinkFilename"></FieldRef>
<FieldRef Name="Department"></FieldRef>
<FieldRef Name="Editor"></FieldRef>
</ViewFields>
<ParameterBindings>
<ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noitemsinview_doclibrary)" />
<ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noitemsinview_doclibrary_howto2)" />
</ParameterBindings>
<Query>
<OrderBy>
<FieldRef Name="Modified" Ascending="FALSE"></FieldRef>
</OrderBy>
</Query>
</View>
<View BaseViewID="7" AggregateView="TRUE" Type="HTML" WebPartZoneID="Main" DisplayName="$Resources:core,Merge_Documents;" TabularView="FALSE" ToolbarTemplate="MergeToolBar" DefaultView="FALSE" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/images/dlicon.png" Url="Forms/Combine.aspx" Hidden="TRUE">
<Toolbar Type="Standard" />
<XslLink Default="TRUE">main.xsl</XslLink>
<RowLimit Paged="TRUE">30</RowLimit>
<ViewFields>
<FieldRef Name="DocIcon"></FieldRef>
<FieldRef Name="LinkFilename"></FieldRef>
<FieldRef Name="Combine"></FieldRef>
<FieldRef Name="Modified"></FieldRef>
<FieldRef Name="Editor"></FieldRef>
</ViewFields>
<ParameterBindings>
<ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noitemsinview_doclibrary)" />
<ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noitemsinview_doclibrary_howto2)" />
</ParameterBindings>
<Query>
<OrderBy>
<FieldRef Name="FileLeafRef" />
</OrderBy>
</Query>
</View>
<View BaseViewID="9" Type="HTML" WebPartZoneID="Main" DisplayName="$Resources:core,Relink_Documents;" ToolbarTemplate="RelinkToolBar" TabularView="FALSE" DefaultView="FALSE" Url="Forms/repair.aspx" ImageUrl="/_layouts/images/dlicon.png" Hidden="TRUE">
<Toolbar Type="Standard" />
<XslLink Default="TRUE">main.xsl</XslLink>
<RowLimit Paged="TRUE">30</RowLimit>
<ViewFields>
<FieldRef Name="DocIcon"></FieldRef>
<FieldRef Name="LinkFilenameNoMenu"></FieldRef>
<FieldRef Name="RepairDocument"></FieldRef>
<FieldRef Name="Modified"></FieldRef>
<FieldRef Name="Editor"></FieldRef>
<FieldRef Name="ContentType"></FieldRef>
<FieldRef Name="TemplateUrl"></FieldRef>
</ViewFields>
<ParameterBindings>
<ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noitemsinview_doclibrary)" />
<ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noitemsinview_doclibrary_howto2)" />
</ParameterBindings>
<Query>
<OrderBy>
<FieldRef Name="FileLeafRef" />
</OrderBy>
<Where>
<Neq>
<FieldRef Name="xd_Signature" />
<Value Type="Boolean">1</Value>
</Neq>
</Where>
</Query>
</View>
<View BaseViewID="40" Type="HTML" WebPartZoneID="Main" DisplayName="assetLibTemp" DefaultView="FALSE" MobileView="FALSE" MobileDefaultView="FALSE" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/images/dlicon.png" Url="Forms/Thumbnails.aspx" Hidden="TRUE">
<Toolbar Type="Standard" />
<ViewFields>
<FieldRef Name="LinkFilename"></FieldRef>
<FieldRef Name="Department"></FieldRef>
</ViewFields>
<RowLimit>20</RowLimit>
<Query>
<OrderBy>
<FieldRef Name="LinkFilename" />
</OrderBy>
</Query>
</View>
</Views>
<Forms>
<Form Type="DisplayForm" SetupPath="pages\form.aspx" Url="Forms/DispForm.aspx" WebPartZoneID="Main" />
<Form Type="EditForm" SetupPath="pages\form.aspx" Url="Forms/EditForm.aspx" WebPartZoneID="Main" />
<Form Type="NewForm" Url="Forms/Upload.aspx" WebPartZoneID="Main" />
<Form Type="NewFormDialog" Path="EditDlg.htm">
<ListFormOpening>
<HTML><![CDATA[
<script type="text/javascript">
var frm = new OWSForm(]]></HTML>
<ScriptQuote>
<Switch>
<Expr>
<GetVar Name="HTMLFormName" />
</Expr>
<Case Value="">
<HTML><![CDATA[OWSForm]]></HTML>
</Case>
<Default>
<GetVar Name="HTMLFormName" />
</Default>
</Switch>
</ScriptQuote>
<HTML><![CDATA[, false, ]]></HTML>
<ScriptQuote>
<HttpVDir />
<HTML>/_layouts/</HTML>
</ScriptQuote>
<HTML><![CDATA[);
</script>
]]></HTML>
<HTML><![CDATA[
<script type="text/javascript">]]></HTML>
<HTML><![CDATA[ frm.dopt.chDateSep = ]]></HTML>
<ScriptQuote>
<LocaleInfo LCTYPE="29" />
</ScriptQuote>
<HTML><![CDATA[; frm.dopt.chTimeSep = ]]></HTML>
<ScriptQuote>
<LocaleInfo LCTYPE="30" />
</ScriptQuote>
<HTML><![CDATA[; frm.dopt.SetTimeFormat(]]></HTML>
<ProjectProperty Select="Time24" />
<HTML><![CDATA[); frm.dopt.SetDateOrder(]]></HTML>
<LocaleInfo LCTYPE="33" />
<HTML><![CDATA[); frm.dopt.SetDOW(]]></HTML>
<LocaleInfo LCTYPE="4108" />
<HTML><![CDATA[); frm.dopt.stAM = ]]></HTML>
<ScriptQuote>
<LocaleInfo LCTYPE="40" />
</ScriptQuote>
<HTML><![CDATA[; frm.dopt.stPM = ]]></HTML>
<ScriptQuote>
<LocaleInfo LCTYPE="41" />
</ScriptQuote>
<HTML><![CDATA[; frm.dopt.TimeMarkPosn = ]]></HTML>
<LocaleInfo LCTYPE="4101" />
<HTML><![CDATA[; frm.dopt.webTZOffsetMin = ]]></HTML>
<ProjectProperty Select="TimeZoneBias" />
<HTML><![CDATA[; ]]></HTML>
<HTML><![CDATA[ frm.nopt.chDigSep = ]]></HTML>
<ScriptQuote>
<LocaleInfo LCTYPE="15" />
</ScriptQuote>
<HTML><![CDATA[; frm.nopt.chDecimal = ]]></HTML>
<ScriptQuote>
<LocaleInfo LCTYPE="14" />
</ScriptQuote>
<HTML><![CDATA[; frm.nopt.chMinus = ]]></HTML>
<ScriptQuote>
<LocaleInfo LCTYPE="81" />
</ScriptQuote>
<HTML><![CDATA[; frm.nopt.iNegNumber = ]]></HTML>
<LocaleInfo LCTYPE="4112" />
<HTML><![CDATA[; frm.nopt.SetGrouping(]]></HTML>
<ScriptQuote>
<LocaleInfo LCTYPE="16" />
</ScriptQuote>
<HTML><![CDATA[); ]]></HTML>
<HTML><![CDATA[
frm.stFieldPrefix = ]]></HTML>
<ScriptQuote>
<FieldPrefix />
</ScriptQuote>
<HTML><![CDATA[;
frm.stImagesPath = ]]></HTML>
<ScriptQuote>/_layouts/images/</ScriptQuote>
<HTML><![CDATA[;
frm.wBaseType = ]]></HTML>
<ListProperty Select="BaseType" />
<HTML><![CDATA[;
</script>]]></HTML>
<Switch>
<Expr>
<GetVar Name="HTMLFormName" />
</Expr>
<Case Value="">
<HTML><![CDATA[<form name="OWSForm" id="OWSForm" EncType="multipart/form-data" Action="]]></HTML>
<HttpPath />
<HTML><![CDATA[" Method=POST onSubmit="return false;">]]></HTML>
</Case>
</Switch>
<HTML><![CDATA[
<input type="Hidden" name="_charset_" value="utf-8">
<input id="onetidCmd" type="Hidden" name="Cmd" value="Save">
<input id="onetidIsFormValid" type="hidden" name="IsFormValid">
<input id="onetidFormWasPosted" type="hidden" name="FormWasPosted">
<input id="MustUpdateForm" type="hidden" name="MustUpdateForm" value="true">
<input type="hidden" name="NextID" id="NextID" value="-1">
<input type="hidden" name="NextUsing" id="NextUsing" value="]]></HTML>
<GetVar Name="Source" HTMLEncode="TRUE" />
<HTML><![CDATA[">
]]></HTML>
<HTML><![CDATA[<span id='part1'>]]></HTML>
<Identity />
</ListFormOpening>
<ListFormBody>
<HTML><![CDATA[<table border="0" cellpadding="2">
<script type="text/javascript">var _g_tp_fNewForm = true;</script>
]]></HTML>
<Fields>
<Switch>
<Expr>
<Property Select="Name" />
</Expr>
<Case Value="FileLeafRef">
<SetVar Name="ShowField" Scope="Request">0</SetVar>
</Case>
<Default>
<SetVar Name="ShowField" Scope="Request">1</SetVar>
<HTML><![CDATA[<tr style="display:none"><th nowrap="nowrap" valign="top" class="ms-formlabel"><nobr>]]></HTML>
<Property Select="DisplayName" HTMLEncode="TRUE" AutoNewLine="TRUE" />
<Switch>
<Expr>
<Property Select="Required" />
</Expr>
<Case Value="TRUE">
<HTML><![CDATA[<font color=red> *</font>]]></HTML>
<SetVar Scope="Request" Name="HasRequired">TRUE</SetVar>
</Case>
<Default>
<HTML><![CDATA[<font color=red></font>]]></HTML>
</Default>
</Switch>
<HTML><![CDATA[</nobr></th><td class="ms-formbody">]]></HTML>
<Field />
<Switch>
<Expr>
<Property Select="RichText" />
</Expr>
<Case Value="TRUE" />
<Default>
<Switch>
<Expr>
<Property Select="Type" />
</Expr>
<Case Value="Choice" />
<Case Value="MultiChoice" />
<Default>
<HTML><![CDATA[ ]]></HTML>
<Switch>
<Expr>
<Property Select="NoEditFormBreak" />
</Expr>
<Case Value="TRUE" />
<Default>
<HTML><![CDATA[<br>]]></HTML>
</Default>
</Switch>
</Default>
</Switch>
</Default>
</Switch>
<HTML><![CDATA[<span class="ms-formdescription">]]></HTML>
<Property Select="Description" HTMLEncode="TRUE" AutoHyperLink="TRUE" AutoNewLine="TRUE" />
<HTML><![CDATA[</span></td></tr>]]></HTML>
</Default>
</Switch>
</Fields>
<HTML><![CDATA[</table>]]></HTML>
<Switch>
<Expr>
<GetVar Name="HasRequired" />
</Expr>
<Case Value="TRUE">
<HTML><![CDATA[
<table border="0" cellpadding="2">
<tr>
<td id="reqdFldTxt" class="ms-descriptiontext" colspan="2" height="150px" valign="top"><br><font color=red>*</font>
 ]]></HTML>
<HTML HTMLEncode="TRUE">$Resources:core,webview_editdlg_required_field;</HTML>
<HTML><![CDATA[
</td>
</tr>
</table>
]]></HTML>
</Case>
</Switch>
<ContentTypes>
<IfSubString>
<Expr1>0x0120</Expr1>
<Expr2>
<Property Select="ID" />
</Expr2>
<Then>
<HTML><![CDATA[
<script type="text/javascript">
_tp_rgctfld = new Array;
_g_tp_rgcts.push(_tp_rgctfld);
var fldct = frmCurrent.FindField("ContentType");
if (fldct != null)
fldct.AddChoice(]]></HTML>
<ScriptQuote>
<Property Select="Name" />
</ScriptQuote>
<HTML><![CDATA[);
</script>
]]></HTML>
</Then>
<Else>
<HTML><![CDATA[
<script type="text/javascript">
var fldct = frmCurrent.FindField("ContentType");
if (fldct != null)
fldct.AddChoice(]]></HTML>
<ScriptQuote>
<Property Select="Name" />
</ScriptQuote>
<HTML><![CDATA[);
_tp_rgctfld = new Array;
]]></HTML>
<ForEach Select="FieldRefs/FieldRef">
<HTML>
_tp_ctfld = new Object(null);
_tp_ctfld.stName=</HTML>
<ScriptQuote>
<Property Select="Name" />
</ScriptQuote>
<HTML>;
_tp_ctfld.fRequired = BoolFromString(</HTML>
<ScriptQuote>
<Property Select="Required" />
</ScriptQuote>
<HTML>);
_tp_ctfld.fHidden = BoolFromString(</HTML>
<ScriptQuote>
<Property Select="Hidden" />
</ScriptQuote>
<HTML>);
_tp_ctfld.fShowInNewForm = BoolFromString2(</HTML>
<ScriptQuote>
<Property Select="ShowInNewForm" />
</ScriptQuote>
<HTML>, true);
_tp_ctfld.fShowInEditForm = BoolFromString2(</HTML>
<ScriptQuote>
<Property Select="ShowInEditForm" />
</ScriptQuote>
<HTML>, true);
_tp_ctfld.fShowInFileDlg = BoolFromString2(</HTML>
<ScriptQuote>
<Property Select="ShowInFileDlg" />
</ScriptQuote>
<HTML>, true);
_tp_ctfld.fReadOnly = BoolFromString(</HTML>
<ScriptQuote>
<Property Select="ReadOnly" />
</ScriptQuote>
<HTML>);
_tp_ctfld.stDisplay =</HTML>
<ScriptQuote>
<Property Select="DisplayName" />
</ScriptQuote>
<HTML>;</HTML>
<ForEach Select="Default">
<HTML>
_tp_ctfld.stDefault=</HTML>
<ScriptQuote>
<Property Select="." />
</ScriptQuote>
<HTML>;</HTML>
</ForEach>
<HTML>
_tp_rgctfld.push(_tp_ctfld);
</HTML>
</ForEach>
<HTML><![CDATA[
_g_tp_rgcts.push(_tp_rgctfld);
</script>
]]></HTML>
</Else>
</IfSubString>
</ContentTypes>
<HTML><![CDATA[
<script type="text/javascript">
var fldct = frmCurrent.FindField("ContentType");
if (fldct != null)
fldct.BuildUI();
</script>
]]></HTML>
</ListFormBody>
<ListFormClosing>
<HTML><![CDATA[
</span>]]></HTML>
<Switch>
<Expr>
<GetVar Name="HTMLFormName" />
</Expr>
<Case Value="">
<HTML><![CDATA[</form>]]></HTML>
</Case>
</Switch>
<HTML><![CDATA[
<script type="text/javascript">
</script>
]]></HTML>
</ListFormClosing>
</Form>
</Forms>
<DefaultDescription>$Resources:core,camlidDc5;</DefaultDescription>
</MetaData>
</List>