I bet you used the filter() function to do it, right?

This function only works if you specify one field or an array of fields to use in filtering out results based on 1 search text. If there is more than 1 value to consider in filtering entries in the store, you will have to use the filterBy() function for custom and complex scenarios.

Check out this sample code.

The code filters entries in the store where a model’s field name labeled fieldname1 and fieldname2 has a substring of searchkey1 and searchkey2 respectively. That is how you should do it.

This won’t work.

Take this class for example where it contains 1 field named domain that contains a url string.

This Javascript file is located in a folder named myfolder where the view, model and controller folders are.

To access the variable, do the following.

This is a Sponsored Post written by me on behalf of Maxithlon. All opinions are 100% mine.

Maxithlon lets anybody get the chance to do something that not everyone can: manage a track and field club to fame. The game is web based and the simulation really likes you are the one managing your club. Your athletes performance will depend heavily in how you manage and train them. Think Sims.

This may be a game after all, but if you really want to bring out the best of your club, Maxithlon takes into account specific human details like physical limitations. To give players a competitive challenge, you will not be pitted against some computer artificial intelligence. Rather, you will challenge other players like you running their own clubs and try to win the championship.

You do not need to be online in real time just to manage your club. Registration is absolutely free so create an account now and delve into the world of track and field. The user interface is pretty straightforward. Detailed information is displayed for all athletes so you can keep track on each of their status. This is critical so you will know firsthand when and how to improve your athletes’ efficiency.

Maxithlon is fun, addicting and easy. Best of all, it is free! Check it out!
Visit my sponsor: Maxithlon - Track and field web browser game

Related Posts Plugin for WordPress, Blogger...