title: Filter a store with array of values from one property with ExtJS
body: <p>I'm trying to apply a constraint on combobox. It's half-working at the moment.
  On the combobox, I have this listener:</p>
  
  <pre><code>[...]
          listeners: {
              'focus': function (combo, value) {
                  var orgComboVal = Ext.getCmp('Org1')
                  var getOrgValue = orgComboVal.getValue();
                  if (typeof getOrgValue !== undefined) {
                      reseaulist.clearFilter(true);
                      for (var q = 0, l = getOrgValue.length; q &lt; l; q++) {
                          reseaulist.filter([
                              {property:'code_organisme', value: getOrgValue[q]}
                          ]);
                      }
                  }
              }
          }
  </code></pre>
  
  <p><b>Ext.getCmp('Org1')</b> defines another combobox.<br>
  When <b>orgComboVal.getValue()</b> is a single value, the filter is well applying.
  <br> but when it's an array of value, eg <b>["5", "9"]</b>, it's not working and the combobox supposed to be filtered shows no value (so I guess a filter is still applied but in an incorrect way).</p>
  
  <p>I guess it's because the reseaulist.filter is called multiple time.
  How can I achieve this ?</p>
  
  <p>I saw the <b> filterBy</b> method but I don't know how to make it work.</p>
  
  <p>Also, this post is interesting : <a href="https://stackoverflow.com/questions/17697133/how-to-filter-a-store-with-multiple-values-at-once">How to filter a store with multiple values at once?</a> but same, can't make it work since</p>
  
  <pre><code>getOrgValue.split(',') 
  </code></pre>
  
  <p>is showing an error</p>
  
  <pre><code>(Object Array has no method split)
  </code></pre>
  
  <p>Any tips ? I'm using ExtJS 4.2.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Thanks to @rixo, I've made it.
  Also, I had to change some of the code he provided me, because the value of the Org1 combobox was always an array, even if empty, so the store filter was never cleared.</p>
  
  <p>Here it is :</p>
  
  <pre><code>            'focus': function (combo, value) {
                  var orgComboVal = Ext.getCmp('Org1')
                  var values = orgComboVal.getValue();
                  console.log(values)
                  if (values != null) {
                      reseaulist.clearFilter(false);
                      if (Ext.isArray(values)) {
                          if (0 &lt; values.length) {
                              reseaulist.filterBy(function(record, id) {
                                  return Ext.Array.contains(values, record.get('code_organisme'));
                              });
                          } else {
                          reseaulist.clearFilter(true);
                      }   
                      } 
                  } 
              }
  </code></pre>