Page 1 of 1

response not returning all fields

Posted: Tue Apr 28, 2015 8:21 pm
by Joe Sharples

I have a database service request:
Image

response run JS:
pre

for(var i = 0; i < data&#46;length; i++){

console&#46;log(data);

}
/pre

When I test the service in the app tester it only returns 4 fields, _id, Club, NightName and City.
Image

Yet when I test the the service in the builder it returns all the fields:
Image


response not returning all fields

Posted: Tue Apr 28, 2015 8:27 pm
by Joe Sharples

I also mapped each field of the response to labels in a list.

it returned "undefined" for
GenreCategory
Day
VenueType

even though every response should have data.

I'm really confused what's causing this.


response not returning all fields

Posted: Tue Apr 28, 2015 8:32 pm
by Joe Sharples

I've also tried using the proj query

{"Day":1, "City":1, "NightName":1, "Club":1,"GenreCategory":1,"VenueType":1,"id":1,"createdAt":1}

this didn't fix it


response not returning all fields

Posted: Tue Apr 28, 2015 9:35 pm
by Illya Stepanov

Hi Joe -

Could you please clarify -- is this happens in AngularJS builder?


response not returning all fields

Posted: Wed Apr 29, 2015 10:18 am
by Joe Sharples

I'm unsure.
I'm not familiar with AngularJS so I have stayed away from using it.

This is just a database service.

how do I check if it's in the AngularJS builder?


response not returning all fields

Posted: Thu Apr 30, 2015 11:37 am
by Serhii Kulibaba

Hello Joe,

Please send us screenshots:
1) data from collection "Nights"
2) Request parameters from app app tester test

You can check project's type by it's icon: http://prntscr.com/6zvae2


response not returning all fields

Posted: Thu Apr 30, 2015 12:40 pm
by Joe Sharples

To clarify it is not Angular.

Thank you for your time but i've found a work around.
I used proj query to remove fields I didnt want:

{"ClubDescription":0,"NightDescription":0,"GenreCategory":0,"acl":0,"createdAt":0,"updatedAt":0}

I'm satisfied with this work around.