Page 2 of 3

Query Service??

Posted: Thu May 16, 2013 1:02 pm
by Stephen Goveia

Any further thoughts friends?


Query Service??

Posted: Thu May 16, 2013 1:06 pm
by Kateryna Grynko

Hi Stephen,
Working on it.


Query Service??

Posted: Thu May 16, 2013 1:28 pm
by Stephen Goveia

Thanks Katya!


Query Service??

Posted: Thu May 16, 2013 2:03 pm
by Kateryna Grynko

Please clarify,
Do you need to get the data from Database and filter the data by "raceID" field?


Query Service??

Posted: Thu May 16, 2013 2:37 pm
by Stephen Goveia

Yes thats correct. I modeled this action based on the tutorial "Building a Clickable List App with HTML5 Local Storage". On page1 I have a list with two labels, one of them is hidden and stores the "raceIDLocalVar" when clicked.

On page2 if "raceIDLocalVar" matches a raceID(from DB) which is associated with a Name(from DB), list all that match.


Query Service??

Posted: Thu May 16, 2013 5:31 pm
by Stephen Goveia

Did Katya go home for the day?


Query Service??

Posted: Thu May 16, 2013 5:37 pm
by Maryna Brodina

Hello! We are working on it. I'll update as soon as I get information. Sorry for delay...


Query Service??

Posted: Thu May 16, 2013 7:27 pm
by Maryna Brodina

Use the following algorithm:
in service query in "where" parameter you should pass an object with corresponding raceID and from response you get map Name field. Add the following JS in mapping for "where" parameter
codereturn '{"raceID": ' + localStorage.getItem("raceIDLocalVar") + '}';/code
if raceID in DB is a number
or
codereturn '{"raceID": "' + localStorage.getItem("raceIDLocalVar") + '"}';/code
if raceID in DB is a string


Query Service??

Posted: Thu May 16, 2013 7:31 pm
by Stephen Goveia

Marina You are a RockStar!! That worked!!


Query Service??

Posted: Thu May 16, 2013 7:33 pm
by Stephen Goveia

Where is the best place to learn these JS syntax nuances?