Problem with SfQueryBuilder.GetPredicate() and notin operator

Hello, 
I think we found a bug in the GetPredicate method of the SfQueryBuilder Blazor component. It happens when the rule is a NOT IN operator.

Code example: se next message.


When the button is clicked, query builder rules are set to "year not in (2019, 2020)". Then the rules are converted to a WhereFilter object through GetPredicate method and the WhereFilter object is printed to console.
What we expect is something like that (some properties omitted):

{
  "isComplex": true,
  "condition": "and",
  "predicates": [
    {
      "field": "Year",
      "operator": "notequal",
      "value": 2019.0,
    },
    {
      "field": "Year",
      "operator": "notequal",
      "value": 2020.0,
    }
  ]
}

Instead, we get this:

{
  "field": "Year",
  "ignoreCase": true,
  "ignoreAccent": false,
  "isComplex": false,
  "operator": "notequal",
  "condition": null,
  "value": 2019.0,
  "predicates": null
}

It seems that  SfQueryBuilder.GetPredicate does not manage well NOT IN conditions: it always return a simple filter with only the first value, instead of a complex condition with every value.


3 Replies 1 reply marked as answer

DO DotCom April 19, 2021 09:01 AM UTC

Sorry, there must be a problem with the form post editor, the code gets clipped. 
See the attachment for the full code example.

Attachment: Example_341929e1.zip


GK Gayathri KarunaiAnandam Syncfusion Team April 23, 2021 02:47 AM UTC

Hi DotCom, 

We have checked your reported query and we can reproduce this issue in our end. We have confirmed this as an issue from our side. We have logged a bug report for this. You can track its status from the below feedback link. The fix will be provided in our patch release which will be scheduled on May 19th, 2021. 


We appreciate your patience until then. 

Regards, 
Gayathri K 



GK Gayathri KarunaiAnandam Syncfusion Team July 20, 2021 07:11 AM UTC

Hi DotCom,  
  
Thanks for the patience.  
  
We are glad to announce that our Essential Studio 2021 Volume 1 service pack release v19.1.0.63 is rolled out and is available for download under the following link. 



We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 
  
Regards,  
Gayathri K  


Marked as answer
Loader.
Up arrow icon