HOW CAN FIND EXACT VALUE FROM STORE

Takeshi Okada

Total Post:89

Points:629
Posted by  Takeshi Okada
 1670  View(s)
Ratings:
Rate this:
Hi Developers,

I have a store containing value
[
{"name":"samuel","add":"xyz"}
{"name":"samuel fernandes","add":"pqr"}
]

Now when I find the value from store like

myStore.find["samuel","fernandes"]

then it does not return blank. It behaving "like query" (sql % like). so how can find exact value from store? 

Thanks in advance for any recommendations or solutions.
  1. Arun Singh

    Post:68

    Points:476
    Re: how can find exact value from store

    Hi,
    You have asked a good question, basically in Sencha Touch there are two method to find the value from Sencha Store first one is find('Key_Name', 'Key_Value') and second is findExact('Key_Name','Key_Value'),  find() and findExact() both are using for finding value but having a little bit difference, find() behaving SQL LIKE wildcard  functionality where as findExact() finding the exact value from Sencha store.
    Here you have to use findExact() method to finding exact value like this:

    myStore.findExact('samuel','fernandes');

    Mark as Answer if this solution will resolved your problem.
    Thanks!!

      Modified On Aug-05-2013 01:36:11 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!