No announcement yet.
  • Filter
  • Time
Clear All
new posts

    Problem with Contains Patter filter after filtering with incorrect pattern and saving changes

    We have editable grid with filters.
    We have problem with following scenario:
    1. Filter text column with default filter Contains Pattern with filter value: "(migration"
    2. Backend returns filtered results correctly
    3. Edit one of the returned records and click save
    4. Application is failing with the following error message in the console:

    Uncaught SyntaxError: Invalid regular expression: /^.*(migration.*$/: Unterminated group
    at new RegExp (<anonymous>)
    at Object.regexpCheck (DataSource.js:29795)
    at Object.matchesPatternCheck (DataSource.js:29863)
    at Object.containsPatternCheck [as condition] (DataSource.js:29988)
    at cons.evaluateCriterion (DataSource.js:29309)
    at Object.booleanOperator [as condition] (DataSource.js:30110)
    at cons.evaluateCriterion (DataSource.js:29309)
    at cons.recordsMatchingAdvancedFilter (DataSource.js:29342)
    at cons.applyFilter (DataSource.js:25899)
    at cons.applyFilter (ResultSet.js:4286)
    at cons.updateCacheData (ResultSet.js:3119)
    at cons.updateCache (ResultSet.js:3041)
    at cons.handleUpdate (ResultSet.js:2912)
    at cons.dataSourceDataChanged (ResultSet.js:2857)
    at cons.eval (eval at isc__makeFunction (Object.js:151), <anonymous>:4:10)
    at cons.thunk (Class.js:2609)
    at cons.observation [as dataChanged] (Class.js:2558)
    at cons.updateCaches (DataSource.js:12949)
    at Object.handleUpdate (DataSource.js:4680)
    at cons.fireResponseCallbacks (DataSource.js:16172)
    at cons._completeResponseProcessing (DataSource.js:16142)
    at cons._handleJSONReply (DataSource.js:13975)
    at cons._handleJSONTextReply (DataSource.js:14092)
    at cons.fireCallback (Class.js:1867)
    at cons.fireCallback (Class.js:3783)
    at cons.fireReplyCallback [as __fireReplyCallback] (RPCManager.js:4759)
    at cons.fireReplyCallbacks (RPCManager.js:4822)
    at cons.performOperationReply (RPCManager.js:4751)
    at cons._performTransactionReply (RPCManager.js:4655)
    at cons.performTransactionReply (RPCManager.js:4006)
    at eval (eval at isc__makeFunction (Object.js:151), <anonymous>:3:16)
    at cons.fireCallback (Class.js:1867)
    at cons.performXmlTransactionReply (Comm.js:479)
    at eval (eval at isc__makeFunction (Object.js:151), <anonymous>:3:10)
    at Object.fireCallback (Class.js:1867)
    at cons._fireXMLCallback (Comm.js:135)
    at XMLHttpRequest.loadFunc (Comm.js:374)

    I was trying to change default filter from Contains Pattern to Contains because we don't need it with following code:


    but with not effect. We are still getting Contains Pattern filter as default.

    We would like to at least be able to catch this exception, but unfortunately we don't know how.

    Could you advise some solution ?

    Which product and version are you using? If you have not tested with the latest patched build (see, please do so before responding again, and make sure to do so before posting.