Page 1 of 7

Creating a search with 2 variables

Posted: Fri Mar 01, 2013 4:07 pm
by Chris Ross

Okay, i'm still attempting to setup my database search on my app. I have two variables (county & restaurant). I need the grade to display on another page. I have tried several different ways to setup my backend service, but nothing seems to be working. Please help........


Creating a search with 2 variables

Posted: Fri Mar 01, 2013 4:15 pm
by Chris Ross

Here's a few pics of my project for school, so you can see my problem Image

Image

Image

Image

Image

Image


Creating a search with 2 variables

Posted: Fri Mar 01, 2013 4:16 pm
by Chris Ross

I go into the data screen and try to map the database correctly, but it hasn't worked for me yet. I need some advice


Creating a search with 2 variables

Posted: Fri Mar 01, 2013 4:18 pm
by Chris Ross

maybe its because I have a javascript, under my buttons, that includes a huge array....... here's an example Image


Creating a search with 2 variables

Posted: Fri Mar 01, 2013 4:19 pm
by Kateryna Grynko

Chris, we'll take a look.


Creating a search with 2 variables

Posted: Fri Mar 01, 2013 4:20 pm
by Chris Ross

I created dynamic buttons for my app. The "restaurant" button will change depending on what "county" you choose.


Creating a search with 2 variables

Posted: Fri Mar 01, 2013 4:22 pm
by Chris Ross

Creating a search with 2 variables

Posted: Fri Mar 01, 2013 4:26 pm
by Chris Ross

I need my results to display in the red.......... Image


Creating a search with 2 variables

Posted: Fri Mar 01, 2013 4:49 pm
by Kateryna Grynko

To create search in Database by 2 fields you would need in request parameter "where" click "Add JS" and paste the following code:codevar whereClause = { "County": localStorage.getItem("County"),
"Restaurant": localStorage.getItem("Restaurant")};
return JSON.stringify(whereClause);/code
You have a typo: column name in database is "County" and localStorage variable name is "County", too.


Creating a search with 2 variables

Posted: Fri Mar 01, 2013 5:06 pm
by Chris Ross

Thank You!!!!! Can't wait to try it out!!!!!