Filtering string field with integer values generates invalid ODataV4 URI

Using SfTreeGrid, with SfDataManager (ODataV4Adaptor) datasource, if one filters a string field which contains numeric data, the URI is incorrectly generated without quotes, causing failure.

e.g. 1) If you enable filtering on a SFTreeGrid with OdataV4 datasource, and filter a string column, with the value 1004, the following URI is generated, which fails:

/odata/GlAccounts?$count=true&$filter=(ID%20eq%201001)

however, if one filters for value a1, the correct URI is generated (with quotes)

/odata/GlAccounts?$count=true&$filter=Parent%20eq%20%27a1%27

e.g. 2) the same failure happens if the TreeGrid has a string primary key, populated with numeric looking strings. It tries to call them as integers, which causes OData controllers to fail request.

Please advise.


8 Replies

PS Pon Selva Jeganathan Syncfusion Team March 8, 2022 04:04 PM UTC

Hi Phil, 
  
Thanks for contacting syncfusion forum. 
  
We are working on this query with high priority. And we need time to find a feasible solution of your requirement and will update you with further details by 10th March, 2022 
  

Until then we value your patience.

     
Regards,   
Pon selva   



PS Pon Selva Jeganathan Syncfusion Team March 10, 2022 03:04 PM UTC

Hi Phil, 
  
Thanks for your patience. 
  

We checked your query by preparing sample, but we were unable to reproduce the issue(if one filters a string field which contains numeric data, the URI is incorrectly generated without quotes, causing failure) at our end. And both cases are working fine.

Please refer to the below sample,

https://www.syncfusion.com/downloads/support/directtrac/general/ze/ODataV4-Filter338936407

Please refer to the below screenshot,

Still if you are facing the issue, kindly get back to us with the below requested details, 
 
  1. Share the complete tree grid code example
  2. If possible, share the issue reproducible sample or reproduce the issue on shared sample.
  3. Share the filter queryString details
The provided information will be helpful to provide you response as early as possible.   
    
Regards,   
Pon selva   
  
 



PH Phil Holmes March 11, 2022 10:39 AM UTC

Hi Pon,

Please find attached example solution to demonstrate the problem.

  1. Navigate to the TreeGrid page,
  2. Expand the 'a' hierarchy. This works.
  3. Expand the 1 hierarchy. This fails.
  4. Try the filtering. This seems to be failing in various ways.



Attachment: DemoFail_3_(send)_4cec47ec.zip


PS Pon Selva Jeganathan Syncfusion Team March 14, 2022 04:29 PM UTC

Hi Phil,   
  
Thanks for the update. 
  
We were able to reproduce the issue at our end. 
  
We have confirmed this as an issue and logged the defect report “Script error thrown while expand and filter the string field records in oDataV4 adaptor” for the same. Thank you for taking the time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technical feasibility and Product Development Life Cycle) and including the fix in our upcoming bi-weekly release which is expected to be rolled out on March 30, 2022. 
        
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.        
  
Disclaimer: The feedback link is in review state and you can view it once it is validated 
  
Regards,   
Pon selva   
  



PS Pon Selva Jeganathan Syncfusion Team April 6, 2022 05:17 AM UTC

Hi Phil,


Sorry for the inconvenience caused.


Due to some internal complexities, we could not include the fix as promised. We are currently working on it high priority and will include it in the weekly patch scheduled to be rolled out by 13th April 2022.


Regards,
Pon selva




PS Pon Selva Jeganathan Syncfusion Team April 13, 2022 01:03 PM UTC

Hi Phil,


We appreciate your patience.   


We are glad to announce that fix for the issue Script error thrown while expand and filter the string field records in oDataV4 adaptor”  has been rolled out in our patch release. We request you to update to our latest version "20.1.48". 


Kindly get back to us for further assistance. 


Regards,

Pon selva




PH Phil Holmes April 14, 2022 12:49 AM UTC

Thanks Pon,

I have downloaded & checked functionality, and DOES appear to be working OK now.

Regards,

Phil




FS Farveen Sulthana Thameeztheen Basha Syncfusion Team April 15, 2022 07:28 AM UTC

Hi Phil,


Thanks for your update. We are glad to know that your reported problem has been resolved. Please get back to us if you need any further assistance.


Regards,

Farveen sulthana T


Loader.
Up arrow icon