PDA

View Full Version : Fetch Record from Store



pkvenu
22 Dec 2011, 3:48 PM
Hi Guys,

I need some help on how to fetch a record from a data store based on a value in object.

Attached the image of the store. I need to get the record from the store based on FacilityID

In the image the array contains 81 objects. I need to get the record(object values) based on FacilityID
30262

I tried something like

App.stores.ParkingFacility('data.items[3].FacilityID',941);

Here App.stores.ParkingFacility.data.items[3] contains the collection of 81 objects which has a property FacilityID.

Thanks
PK

mitchellsimoens
23 Dec 2011, 8:01 AM
If you are trying to find a record in a store, I would suggest one of the find methods like findRecord

http://docs.sencha.com/touch/1-1/#!/api/Ext.data.Store-method-findRecord