1

Probably something simple but i'm not sure what the problem is here. I create several custom list views in my schema.xml for my list. I deploy and go in sharepoint designer to make sure everything is ok. I click on the list i created but only the FIRST view in from schema.xml is listed in the Views table. Why are the other two not showing up? If i delete the first list the next appears. I want all three to be shown in the Views table. here is the portion of schema.xml

  <View BaseViewID="1" Type="HTML" Hidden="FALSE" WebPartZoneID="Main" DisplayName="Management Users" OrderedView="TRUE" DefaultView="TRUE"  MobileView="TRUE" MobileDefaultView="TRUE" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/images/generic.png" Url="AllItems.aspx">
    <Toolbar Type="Standard" />
    <XslLink Default="TRUE">main.xsl</XslLink>
    <RowLimit Paged="TRUE">10</RowLimit>
    <ViewFields>
      <FieldRef Name="Photo"></FieldRef>
      <FieldRef Name="Position"></FieldRef>
      <FieldRef Name="LastName"></FieldRef>
      <FieldRef Name="FirstName"></FieldRef>
      <FieldRef Name="Email"></FieldRef>
      <FieldRef Name="PhoneNumber"></FieldRef>
      <FieldRef Name="Info"></FieldRef>
    </ViewFields>
    <Query>
      <Where>
        <Eq>
          <FieldRef Name="Group"/>
          <Value Type="Choice">Management</Value>
        </Eq>
      </Where>
      <OrderBy>
        <FieldRef Name="LastName" Ascending="TRUE"></FieldRef>
      </OrderBy>
    </Query>
    <ParameterBindings>
      <ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" />
      <ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_DEFAULT)" />
    </ParameterBindings>
  </View>
  <View BaseViewID="2" Type="HTML" WebPartZoneID="Main" DisplayName="PPM Users" OrderedView="TRUE" DefaultView="FALSE"  MobileView="TRUE" MobileDefaultView="TRUE" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/images/generic.png" Url="AllItems.aspx">
    <Toolbar Type="Standard" />
    <XslLink Default="TRUE">main.xsl</XslLink>
    <RowLimit Paged="TRUE">10</RowLimit>
    <ViewFields>
      <FieldRef Name="Photo"></FieldRef>
      <FieldRef Name="Position"></FieldRef>
      <FieldRef Name="LastName"></FieldRef>
      <FieldRef Name="FirstName"></FieldRef>
      <FieldRef Name="Email"></FieldRef>
      <FieldRef Name="PhoneNumber"></FieldRef>
      <FieldRef Name="Info"></FieldRef>
    </ViewFields>
    <Query>
      <Where>
        <Eq>
          <FieldRef Name="Group"/>
          <Value Type="Choice">PPM</Value>
        </Eq>
      </Where>
      <OrderBy>
        <FieldRef Name="LastName" Ascending="TRUE"></FieldRef>
      </OrderBy>
    </Query>
    <ParameterBindings>
      <ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" />
      <ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_DEFAULT)" />
    </ParameterBindings>
  </View>
  <View BaseViewID="3" Type="HTML" WebPartZoneID="Main" DisplayName="PCL Users" OrderedView="TRUE" DefaultView="FALSE"  MobileView="TRUE" MobileDefaultView="TRUE" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/images/generic.png" Url="AllItems.aspx">
    <Toolbar Type="Standard" />
    <XslLink Default="TRUE">main.xsl</XslLink>
    <RowLimit Paged="TRUE">10</RowLimit>
    <ViewFields>
      <FieldRef Name="Photo"></FieldRef>
      <FieldRef Name="Position"></FieldRef>
      <FieldRef Name="LastName"></FieldRef>
      <FieldRef Name="FirstName"></FieldRef>
      <FieldRef Name="Email"></FieldRef>
      <FieldRef Name="PhoneNumber"></FieldRef>
      <FieldRef Name="Info"></FieldRef>
    </ViewFields>
    <Query>
      <Where>
        <Eq>
          <FieldRef Name="Group"/>
          <Value Type="Choice">PCL</Value>
        </Eq>
      </Where>
      <OrderBy>
        <FieldRef Name="LastName" Ascending="TRUE"></FieldRef>
      </OrderBy>
    </Query>
    <ParameterBindings>
      <ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" />
      <ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_DEFAULT)" />
    </ParameterBindings>
  </View>
</Views>

TIA

4

By just looking at your XML I noticed that you defined Url="AllItems.aspx" in all of your views. So every 'new' view is overwriting last one added and you end up with only one view.

You need to set different Url attribute for each view.

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.