Darren Cassidy
Posts: 0
Joined: Mon Aug 11, 2014 2:10 pm

Populating a list from the database and using a Where request

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

Darren Cassidy
Posts: 0
Joined: Mon Aug 11, 2014 2:10 pm

Populating a list from the database and using a Where request

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

Darren Cassidy
Posts: 0
Joined: Mon Aug 11, 2014 2:10 pm

Populating a list from the database and using a Where request

How do i close this as solved?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Populating a list from the database and using a Where request

Hi Darren,

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

Return to “Issues”