Reputation: 19163
If I need to find a record in EXTJS store, I typically use findRecord method. It takes the name of the field and the value you want to search.
myStore.findRecord('EmployeeID', rec.empId);
But what If I want to search store for a record based on multiple fields. Lets say I want to search record by Employee ID
and Employee Departamet ID
I am using ExtJs 4.1
Upvotes: 1
Views: 8448
Reputation: 42306
Use findBy and pass a custom function
http://docs.sencha.com/extjs/4.2.2/?mobile=/api/Ext.data.Store#method-findBy
Upvotes: 2