Ext.data.Store Incorrectly Filters Multiple Fields and Values In Sencha Touch

I bet you used the filter() function to do it, right?

This function only works if you specify one field or an array of fields to use in filtering out results based on 1 search text. If there is more than 1 value to consider in filtering entries in the store, you will have to use the filterBy() function for custom and complex scenarios.

Check out this sample code.

The code filters entries in the store where a model’s field name labeled fieldname1 and fieldname2 has a substring of searchkey1 and searchkey2 respectively. That is how you should do it.

This won’t work.

Related Posts Plugin for WordPress, Blogger...


  1. Hallo,
    The following code filter records stored in geoexr store. How can i filter the same without using the store.load(); feature because this will take alot of time to load before it starts filtering

    water_point_store.on(‘load’, function(store, records, options)
    var selectedCounty=combobox.getValue(); water_point_store.filter(‘county’, SelectedCounty, true, true);

Leave a Reply

Your email address will not be published. Required fields are marked *