Page 1 of 1

Populating a list from the database and using a Where request

Posted: Fri Aug 15, 2014 5:18 pm
by Darren Cassidy

Again, it works in the tester but not in the datasource using the JS. I'm trying to populate a list from the database and only include rows where the poster column has a pointer matching their ID. AKA a list of that persons posts. It works in the database service tester but not when I translate it into a JSON object in JS. I'm using a sample string for example purposes, it will need to be a mapped local variable so that's why i need to use Js.

{"poster":{"collName":"users","id": "53ee21c6e4b003453214b26d"}}
%% works

return '{"poster":{"collName":"users","id": "53ee21c6e4b003453214b26d"}}';
%% doesn't work


Populating a list from the database and using a Where request

Posted: Fri Aug 15, 2014 5:32 pm
by Darren Cassidy

Fixed. I wasn't calling it on page load. whoops :-/.


Populating a list from the database and using a Where request

Posted: Fri Aug 15, 2014 5:32 pm
by Darren Cassidy

How do i close this as solved?


Populating a list from the database and using a Where request

Posted: Fri Aug 15, 2014 6:25 pm
by Kateryna Grynko

Hi Darren,

Thank you for the update, I mark this as Solved.