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:

    <LobSystem Name="PortalExtListBdcModel" Type="DotNetAssembly">
        <LobSystemInstance Name="PortalExtListBdcModel"/>

        <Entity EstimatedInstanceCount="1000" Name="ProductEdgeEntity" Namespace="SPPortal.PortalExtListBdcModel" Version="">
            <Property Name="Class" Type="System.String">SPPortal.PortalExtListBdcModel.Controllers, PortalExtListBdcModel</Property>
            <Identifier TypeName="System.String" Name="IM_STOCK" />
            <Method Name="ProductEdgeReadList">
                <FilterDescriptor Type="UserContext" Name="UserContextFilter">
                    <Property Name="UsedForDisambiguation" Type="System.Boolean">false</Property>
                    <Property Name="IsDefault" Type="System.Boolean">false</Property>
                    <Property Name="CaseSensitive" Type="System.Boolean">false</Property>
                <Parameter Direction="In" Name="UCFilter">
                  <TypeDescriptor Significant="true" TypeName="System.String"  Name="UCFilter" AssociatedFilter="UserContextFilter">
                      <DefaultValue MethodInstanceName="ProductEdgeReadList" Type="System.String"></DefaultValue>
                <Parameter Direction="Return" Name="returnParameter">
                  <TypeDescriptor TypeName="System.Collections.Generic.IEnumerable`1[[SPPortal.PortalExtListBdcModel.PrismProductListView, PortalExtListBdcModel]]" IsCollection="true" Name="ProductEdgeEntityList">
                      <TypeDescriptor TypeName="SPPortal.PortalExtListBdcModel.PrismProductListView, PortalExtListBdcModel" Name="ProductEdgeEntity">
                          <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:


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?


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.