1

I have an external list (WCF) and I would like to have another web part that searches 1 or more columns on the list (e.g. Product Title, and Product Status etc)

I'm using SP2013, guess it would be the same for SP2010

The out-of-box filtering wouldn't work because I have paging on my list, and I only fetch 1 page at a time (because I have thousands of items). so the out-of-box filter will only search on match items in that 1 page.

My current list is deployed from a Sharepoint project, it is a Business Data Connectivity Model(farm solution only).

Here's part of my BDCM and controller:

  <LobSystems>
    <LobSystem Name="PortalExtListBdcModel" Type="DotNetAssembly">
      <LobSystemInstances>
        <LobSystemInstance Name="PortalExtListBdcModel"/>
      </LobSystemInstances>
      <Entities>

        <Entity EstimatedInstanceCount="1000" Name="ProductEdgeEntity" Namespace="SPPortal.PortalExtListBdcModel" Version="1.0.0.0">
          <Properties>
            <Property Name="Class" Type="System.String">SPPortal.PortalExtListBdcModel.Controllers, PortalExtListBdcModel</Property>
          </Properties>
          <Identifiers>
            <Identifier TypeName="System.String" Name="IM_STOCK" />
          </Identifiers>
          <Methods>
            <Method Name="ProductEdgeReadList">
              <FilterDescriptors>
                <FilterDescriptor Type="UserContext" Name="UserContextFilter">
                  <Properties>
                    <Property Name="UsedForDisambiguation" Type="System.Boolean">false</Property>
                    <Property Name="IsDefault" Type="System.Boolean">false</Property>
                    <Property Name="CaseSensitive" Type="System.Boolean">false</Property>
                  </Properties>
                </FilterDescriptor>
              </FilterDescriptors>
              <Parameters>
                <Parameter Direction="In" Name="UCFilter">
                  <TypeDescriptor Significant="true" TypeName="System.String"  Name="UCFilter" AssociatedFilter="UserContextFilter">
                    <DefaultValues>
                      <DefaultValue MethodInstanceName="ProductEdgeReadList" Type="System.String"></DefaultValue>
                    </DefaultValues>
                  </TypeDescriptor>
                </Parameter>
                <Parameter Direction="Return" Name="returnParameter">
                  <TypeDescriptor TypeName="System.Collections.Generic.IEnumerable`1[[SPPortal.PortalExtListBdcModel.PrismProductListView, PortalExtListBdcModel]]" IsCollection="true" Name="ProductEdgeEntityList">
                    <TypeDescriptors>
                      <TypeDescriptor TypeName="SPPortal.PortalExtListBdcModel.PrismProductListView, PortalExtListBdcModel" Name="ProductEdgeEntity">
                        <TypeDescriptors>
                          <TypeDescriptor TypeName="System.String" IdentifierName="IM_STOCK" Name="IM_STOCK" />
                          <TypeDescriptor Name="IM_DESC" TypeName="System.String" DefaultDisplayName="Description" />
                          <TypeDescriptor Name="IM_CUST" TypeName="System.String" DefaultDisplayName="Customer Code" />


        public static IEnumerable<PrismProductListView> ProductEdgeReadList(string UCFilter)
        {
            // get from WCF service and return list
        }

I also worked out how to have a Web part send values to another web part using the following:

[ConnectionProvider("Title")]
[ConnectionConsumer("Title")]

But I'm trouble having the web part send values to my BDCM

Does anyone has examples on how to modify the BDCM (the xml above) to take parameters (direction=IN) from the web part?

Or if there are other ways to achieve this?

Thanks!

Your Answer

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

Browse other questions tagged or ask your own question.