1. #1
    Sencha User
    Join Date
    Jun 2013
    Posts
    59
    Vote Rating
    3
    Answers
    1
    good_c_ryan_19 is on a distinguished road

      0  

    Default Unanswered: How to filter store with one or more parameters

    Unanswered: How to filter store with one or more parameters


    Hi i have below code that filter my Local store with single parameter

    Code:
    var notesLocal = Ext.getStore("NotesLocal");
    
    var NoteType = 'remarks';
            notesLocal.filter(Ext.create('Ext.util.Filter', {
                property: "NoteType",
                value: NoteType ,
                exactMatch: true
            }));
    now i also need to filter it by ChildID and Remarks fields.

    Code:
    var ChildID = 1;
    var NoteType = 'Remarks';.
    
    //store filter by NoteType and ChildID ??
    I searched for some examples but i can't find one for multiple parameters filter. Any help is appreciated.

    Thanks

  2. #2
    Sencha User
    Join Date
    Oct 2013
    Location
    France
    Posts
    33
    Vote Rating
    0
    Answers
    2
    maxusn is on a distinguished road

      0  

    Default


    Hi, I don't know if it's the best way to do this but you could try :

    Code:
     var filters = new Array();                
    
          filters.push(new Ext.util.Filter({
                property: property1,
                value   : value
            }));
    
    
           filters.push(new Ext.util.Filter({
                property: property2,
                value   : value
            }));
    
    
            store.filter(filters);
            store.load();

  3. #3
    Sencha User
    Join Date
    Jun 2013
    Posts
    59
    Vote Rating
    3
    Answers
    1
    good_c_ryan_19 is on a distinguished road

      0  

    Default


    Thanks I will try that! Regards

Thread Participants: 1

Tags for this Thread