Home > DeveloperSection > Forums > how can find exact value from store
Takeshi Okada
Takeshi Okada

Total Post:89

Points:629
Posted on    June-14-2013 6:53 AM

 Sencha Touch Sencha Touch 
Ratings:


 1 Reply(s)
 1334  View(s)
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.


Arun Singh

Total Post:68

Points:476
Posted on    August-05-2013 1:35 AM

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

Don't want to miss updates? Please click the below button!

Follow MindStick