Receiving Data from SharePoint Lists and Business Connectivity Services

  • 10/15/2011

Adding a Filter to a Business Connectivity External Content Type

Part of the reason the External Item Picker control is so daunting for new forms designers is that it requires knowing exactly which information from the ECT in SharePoint must be added to the control properties so that everything works correctly. That information was covered in the previous exercise. In most cases, an ECT will be created either in Microsoft Visual Studio or SharePoint Designer 2010. In either case, the developer or administrator should be able to give you the necessary data. However, to make the External Item Picker work as intended, the one extra step that you might need to ask them to take is to add a wildcard filter so that your users can search for the information. The filter must be added in a very specific manner for it to work properly. The screenshots included in the following exercise are from an ECT that has been set up in SharePoint Designer. The instructions will provide the steps necessary for you or your SharePoint administrator to add the filter to new or existing ECTs.

  1. Select the appropriate ECT; in this case, it is Sales Order DB.

  2. In the External Content Type Operations dialog box, double-click Read List to open the Read List Operation Properties Wizard.

    httpatomoreillycomsourcemspimages1713926.png
  3. On the Filter Parameters page of the wizard, set your configuration as shown in the following illustration.

    The name of the filter will be the same name that you use to populate the Finder Name field in the External Item Picker properties in InfoPath. The Data Source Element and Filter field should be set to the same field from the database as the one you want the picker control in InfoPath to display.

  4. On the Return Parameter page, ensure that you have selected the appropriate Data Source Element option and that the Show In Picker check box is selected.

  5. When you’ve completed the Read List Operation Properties Wizard, save your changes in SharePoint Designer. This will update the ECT properties in BCS and allow your form to filter on the data source.