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

Can't use "where" condition in REST request retrieving distinct values

Dear Wolfgang,

Unfortunately, distinct request doesn't support returning the whole record as a response.

The only option is to make a second request with the mechanism of search for items included in the array. An example can be found here: http://docs.appery.io/documentation/b... .

You would need $in operator.

Wolfgang Dietersdorfer
Posts: 0
Joined: Wed Aug 14, 2013 11:35 pm

Can't use "where" condition in REST request retrieving distinct values

hi, i just want a list of records (using a search service) restricted by a "where" parameter - no distinct values.
But I can't add multiple values to the where parameter using the approach described by marina - because the "add level" button is missing.
I have to change to the "post" method on the service settings to get the "add level" button.
But using the "post" method throws an error(DBSC216) instead of retrieving the requested records.

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

Can't use "where" condition in REST request retrieving distinct values

Wolfgang,

Let's try POST method again, but without levels.

Use one parameter "where", but in the parameter JS code return from the function not a string:
codereturn '{"param": "value"}';/code
Try to return an object:
codereturn {
"param": "value"
};/code

Wolfgang Dietersdorfer
Posts: 0
Joined: Wed Aug 14, 2013 11:35 pm

Can't use "where" condition in REST request retrieving distinct values

sort"":""Colour""} This is the reponse I get: {""code"":""DBSW219""

Return to “Issues”