In this article we explore External Content Type how to apply a comparison filter on a System.Nullable<System.Int32> in BCS. I’m creating an External Content Type with SQL Store procedure in SharePoint 2013. I have one input parameters of the type System.Nullable<System.Int32> and I’d like to add filters of the type Comparison to these input parameters.
Filters in BCS are very handy, and often necessary, for reducing the amount of items when working with External Data, such as an External Data Column based on an External Content Type.
A sample input parameter for a Read List operation,may look like this:
If you want to add a Comparison filter for this input parameter, you would probably set it up like this:
When you click OK, you would see an Error message in the Errors and Warning list at the bottom of the page.
It seems like SharePoint BCS is unable to cope with Nullable Int .NET data types, which would be odd, as they have been around in the .NET Framework since version 2.0.
It shows an Error message:
“The filter data type Sytem.Nullable<System.Int32> does not match data type System.Int32 on the data source element [[ElementName]].
Read some SharePoint 2013 tutorials below:
- Current User Filter Web Part in SharePoint 2016
- GridView in PowerShell in SharePoint
- Upload documents from network drive to SharePoint 2013 or SharePoint 2016 Server docuemnt library using PowerShell
The solution is to set the Filter Field property of the Filter to <<none>>. Since the Filter Configuration dialog is started from the Element properties panel, the Element to filter is still linked to this filter.
Press OK to close the Dialog and press Finish to close the Read List dialog. Save your changes to ECTs.
We configure comparison filter External Content Type ’ to Business data List.
Step 1: Navigate to your SharePoint 2013 site.
Step 2: From this page select the Site Actions | Edit Page.
Edit the page, go to the “Insert” tab in the ribbon and click the “Web Part” option. In the “Web Parts” picker area, go to the “Business data” category, select the “Business data List” Web Part and press the “Add button”.
I hope its help full….