Filter on NotNull

Carol Wapshere 3 years ago in UNIFYBroker/Microsoft Dynamics CRM • updated by anonymous 3 years ago 6

I want to set the connector filter to exclude contacts that don't have an email adress. I have checked this page: https://msdn.microsoft.com/en-us/library/microsoft.xrm.sdk.query.conditionoperator.aspx and there is a filterType "NotNull" however IdB won't let me save "emailaddress1 NotNull". I think it is looking for a value on the other side of the filter, but for this I don't need one.

I tried setting setting "emailaddress1 NotNull Null" and also tried setting fieldValue="" in the Connector XML but for both I get this error in running the Import: "Condition operation 'NotNull' requires that no values are set".

Also tried "emailaddress1 Contains @" but I guess emailaddress1 isn't full-text indexed as I got the SQL error mentioned in the article.

And "emailaddress1 NotEqual Null" was accepted, and imported, but imported everything, irrespective of emailaddress1 having a value or not.

Affected Versions:
Fixed by Version:


Under review

The filter currently assumes that there is a field, type and value, so I'll have a look at what can be done here.

Under review

The filter currently assumes that there is a field, type and value, so I'll have a look at what can be done here.

System.ArgumentException: Missing fieldValue attribute in <Filter field="casa_arn" filterType="NotNull" />
at Unify.Framework.XElementExtensions.AttributeValueModify(XElement sourceElement, XName attributeName, Action`1 modifyAttribute) in C:\TeamCity\buildAgent\work\93adf8032d578b01\Source\Xml\Unify.Framework.Xml\XElementExtensions.AttributeValues.cs:line 31
at Unify.Product.IdentityBroker.FilterStringAdapter.Transform(XElement sourceValue)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Unify.Product.IdentityBroker.FiltersStringAdapter.Transform(XElement sourceValue)
at Unify.Product.IdentityBroker.DynamicsCrmObjectConnectorConfigurationFactory.CreateComponent(XElement configurationElement)
at Unify.Connect.Web.DynamicsCrmObjectConnectorController.Display(DisplayConnectorInformation displayInformation)
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)

Looking good. It's a big import so takes a while but over 100k imported so far and I can't see any missing the two fields I need to have populated.

Yes it was, thanks for that.