Page 1 of 2

retrieving data from collection

Posted: Tue Aug 20, 2013 10:46 am
by Michael4771079

Hi,
I need some guidance regarding db collections,
I have added a db collection,
I want to get 4 fields returned

Company Name, Telephone, Email, and Image for companies in a particular town

Here is a screen shot of collection

Image

do you have an example of this service,

thx


retrieving data from collection

Posted: Tue Aug 20, 2013 10:53 am
by Kateryna Grynko

Hi Michael,

See our tutorials: http://docs.appery.io/tutorials/#Appe...


retrieving data from collection

Posted: Wed Aug 21, 2013 11:32 am
by Michael4771079

Hi Katya,
I have followed the above tutorial but its not working for me,

here are some screenshots of the service, mapping and console error

Image

Image

Image

the following test gets a success when nothing is typed in "where"

Image

but you type a town name to "where" it fails

Image


retrieving data from collection

Posted: Wed Aug 21, 2013 11:34 am
by Michael4771079

retrieving data from collection

Posted: Wed Aug 21, 2013 11:35 am
by Michael4771079

retrieving data from collection

Posted: Wed Aug 21, 2013 12:40 pm
by Kateryna Grynko

Hi Michael,

Please note the "where" parameter using: http://docs.appery.io/tutorials/build...


retrieving data from collection

Posted: Wed Aug 21, 2013 1:01 pm
by Michael4771079

Thx Katya,
I added the js

Test of service gives a different error

Image

and in the console

Image


retrieving data from collection

Posted: Wed Aug 21, 2013 1:36 pm
by Kateryna Grynko

We can't see it on screen shot, please post the text you pass in "where" here.


retrieving data from collection

Posted: Wed Aug 21, 2013 1:39 pm
by Michael4771079

NEWCASLTE UPON TYNE


retrieving data from collection

Posted: Wed Aug 21, 2013 3:19 pm
by Maryna Brodina

Hi Michael! In "where" parameter you need to pass JSON string. For example instead NEWCASLTE UPON TYNE should be code{"Town": "NEWCASLTE UPON TYNE"}/code