.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Sandeep Singh
Melody Anderson
Eminent IT

Home >> Articles >> SharePoint >> Post New Resource Bookmark and Share   

 Subscribe to Articles

SharePoint 2013-BCS: using a comparison filter on a System.Nullable<System.Int32> field

Posted By:Sagar Pardeshi       Posted Date: February 27, 2016    Points: 200    Category: SharePoint    URL: http://www.dotnetspark.com  

SharePoint 2013-BCS: using a comparison filter on a System.Nullable field


In this article we explore External Content Type how to apply a comparison filter on a System.Nullable<System.Int32>


I'm creating an External Content Type with SQL Store procedure. 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]].


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.


I hope its help full..:)

 Subscribe to Articles


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend