Imaging you have an array containing the names you have to use for filtering the store, we will call this array 'names':
var names = ['Lucas', 'Pablo', 'Noelia'];
What you have to do in your filterFn is return true if the record contains some of the values listed in your names array. The magic is in the some function.
store.filter(Ext.create('Ext.util.Filter', {
filterFn: function(item) {
return names.some(function(name){ return name === item.get('name')});
}
}));
For example, the following store will only contain 2 rows (after apply the filter): Lucas and Pablo:
var names = ['Lucas', 'Pablo', 'Noelia'];
var store = Ext.create('Ext.data.ArrayStore', {
fields: ['id', 'name'],
data: [
[ 1, 'Lucas' ],
[ 2, 'Pablo' ],
[ 3, 'Francisco' ]
]
});
store.filter(Ext.create('Ext.util.Filter', {
filterFn: function(item) {
return names.some(function(name){ return name === item.get('name')});
}
}));
// display the filtered record in the console
store.each(function(record){ console.log(record.get('name'))})
You also can do it working here: http://jsfiddle.net/lontivero/5TWq9/3/
I hope this is useful.
Good luck!