Searching in a grid

Posted by dmitchel on 12-Oct-2016 11:43

There may be a problem in the search functionality.  I search for names beginning with "Dan" in the sports database and choose "Dan's" and i get an error in the query.  I think it is because there is an apostrophe in the name.


Can anyone else verify this as an error?


Thanks!

-dan

Posted by egarcia on 12-Oct-2016 12:08

Hello Dan,

There is currently an issue when using apostrophes / single quotes in a query.

Here is a workaround / fix.

You could try updating the function _convertToABLWhereString() in progress.all.js (near line 410) and update the code to look like the following:

                   // We need to build a template format string for the where string.

                   // We'll first add positional info for the value

                   if (type === STRING_OBJECT_TYPE) {

                       format = "'{1}'";

                       value = value.replace(/'/g, "~'");

                   }

Please let me know how it goes if you try it out.

I hope this helps.

Thanks.

Posted by Anil Kumar on 12-Oct-2016 12:12

Hi Dan,
 
This is issue in the current version of the JSDO library. The fix for this issue will be available in the next/future versions of JSDO.
 
From the Kendo UI Builder, the client side filtering works fine with string containing quotes. i.e., checking ‘Client-side filtering’ check box in the ‘Edit Data Source’ screen in Kendo UI Builder will allow us to use client side filtering.
 
Similar post in Communities:
                community.progress.com/.../24405
 
Hope this helps.
 
Thanks and Regards,
Anil Kumar.
 

All Replies

Posted by egarcia on 12-Oct-2016 12:08

Hello Dan,

There is currently an issue when using apostrophes / single quotes in a query.

Here is a workaround / fix.

You could try updating the function _convertToABLWhereString() in progress.all.js (near line 410) and update the code to look like the following:

                   // We need to build a template format string for the where string.

                   // We'll first add positional info for the value

                   if (type === STRING_OBJECT_TYPE) {

                       format = "'{1}'";

                       value = value.replace(/'/g, "~'");

                   }

Please let me know how it goes if you try it out.

I hope this helps.

Thanks.

Posted by Anil Kumar on 12-Oct-2016 12:12

Hi Dan,
 
This is issue in the current version of the JSDO library. The fix for this issue will be available in the next/future versions of JSDO.
 
From the Kendo UI Builder, the client side filtering works fine with string containing quotes. i.e., checking ‘Client-side filtering’ check box in the ‘Edit Data Source’ screen in Kendo UI Builder will allow us to use client side filtering.
 
Similar post in Communities:
                community.progress.com/.../24405
 
Hope this helps.
 
Thanks and Regards,
Anil Kumar.
 

Posted by dmitchel on 12-Oct-2016 13:13

Thanks!  I will try your suggestion Edsel.  I can demo around it in the interim :)

Posted by dmitchel on 12-Oct-2016 15:52

i applied this change in progress.all.js in resources\web\scripts\progress.all.js and it appeared to fix the issue.

thanks.

This thread is closed