Can't use "where" condition in REST request retrieving distinct values
Posted: Wed Sep 18, 2013 10:31 am
by Kateryna Grynko
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.
Can't use "where" condition in REST request retrieving distinct values
Posted: Wed Sep 18, 2013 11:19 am
by Wolfgang Dietersdorfer
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.
Can't use "where" condition in REST request retrieving distinct values
Posted: Wed Sep 18, 2013 12:03 pm
by Kateryna Grynko
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
Can't use "where" condition in REST request retrieving distinct values
Posted: Fri Jul 17, 2020 3:26 pm
by Wolfgang Dietersdorfer
sort"":""Colour""} This is the reponse I get: {""code"":""DBSW219""