1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    7
    Vote Rating
    0
    sshres is on a distinguished road

      0  

    Question Answered: Filter store data by 2 values for the same column

    Answered: Filter store data by 2 values for the same column


    Hi All,

    I am a newbie to ExtJS and have a question. How can I filter data in store by passing multiple values for the same column. The requirement is user wants to see data for two different status together. For eg. I have a column named 'Status'. I want to filter the data by passing values like this:
    property: status, value: "In progress"
    property: status, value: "Rejected"
    and so on...

    Thanks

  2. your question is bout store.filter ?
    store.filter("email", /\.com$/);
    check documentation, im not familiar with filtering but second argument seems to accept a regex u can use to make status equal to "in progress" or "Rejected"

    also filters accepts functions (check the store.filter documentation too)
    {filterFn: function(item) { return item.get("age") > 10; }}

    so maybe u can do something like
    return (item.get('status') == 'In progress' || item.get('status') == 'Rejected')

    or your question its bout loading records from server that correspond to "where status = 'in progess' or status ='rejected'"?

    (sorry for my bad english)

  3. #2
    Sencha User
    Join Date
    Dec 2011
    Posts
    220
    Answers
    13
    Vote Rating
    9
    dedoz will become famous soon enough

      0  

    Default


    your question is bout store.filter ?
    store.filter("email", /\.com$/);
    check documentation, im not familiar with filtering but second argument seems to accept a regex u can use to make status equal to "in progress" or "Rejected"

    also filters accepts functions (check the store.filter documentation too)
    {filterFn: function(item) { return item.get("age") > 10; }}

    so maybe u can do something like
    return (item.get('status') == 'In progress' || item.get('status') == 'Rejected')

    or your question its bout loading records from server that correspond to "where status = 'in progess' or status ='rejected'"?

    (sorry for my bad english)

  4. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    7
    Vote Rating
    0
    sshres is on a distinguished road

      0  

    Default


    Thanks. My questions was on store.filter and your solution worked!

  5. #4
    Sencha User
    Join Date
    Aug 2013
    Posts
    21
    Vote Rating
    0
    sivamurthy is on a distinguished road

      0  

    Default


    Hi All,
    I have to filter the sencha touch store with one property with multiple values, array of values will come dynamically.
    Ex: I have to filter the store for property name with values 'india','america','japan' but values will come dynamically.

    Please let me know how to filter the with above constraints.

    Thanks,
    siva.

Thread Participants: 2

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi