Page 1 of 1

I want to limit my search query to two!

Posted: Thu Dec 15, 2016 8:19 am
by Nada Al Menhali

I did this in my where parameter and i only get one result i have more in my database i just want two to show up

return '{"StudentGender": "'+Appery("SelectorGender").val()+'", "StudentProgram": "'+Appery("SelectorProgram").val()+'"}';

this is the code i did

i need help pls


I want to limit my search query to two!

Posted: Thu Dec 15, 2016 9:31 am
by EJLD

try this

'{"$and":[{"StudentGender": "'+Appery("SelectorGender").val()+'"},{ "StudentProgram": "'+Appery("SelectorProgram").val()+'"}]}'

you can also use "$or" instead


I want to limit my search query to two!

Posted: Thu Dec 15, 2016 10:37 am
by Serhii Kulibaba

Hello,

Please use JS below for that:

prereturn {"$and":[
{"StudentGender": Appery("SelectorGender").val()},
{"StudentProgram": Appery("SelectorProgram").val()}
]}; /pre

more information here: https://docs.appery.io/reference#data...