Page 1 of 1

Query Where

Posted: Thu Jun 11, 2015 2:01 pm
by Johnny7459624

Hi there, I followed tutorial and it showed me how to search in 1 column. But how can I use the where for multiple columns?

See in my img i link on textbox already to the where and i whant to link the second textbox also to the where.

The code in the where is the following="return '{"provinsie":"'+value+'"}';"

Image


Query Where

Posted: Thu Jun 11, 2015 6:44 pm
by Alena Prykhodko

Hello Johnny,

This should help https://devcenter.appery.io/documenta...


Query Where

Posted: Fri Jun 12, 2015 5:20 am
by Johnny7459624

Thank you, dumb question do i then connect all the fields to the "where" and do that js script?


Query Where

Posted: Fri Jun 12, 2015 6:19 am
by Johnny7459624

I get the Query working when i have fix values for example:
return '{"$and": [{"provinsie": "Gauteng"},{"taal": "Afrikaans"}]}';

But when i try this with this mapping:
return '{"$and": [{"provinsie": "'+value+'"},{"taal": "'+value+'"}]}';

It not working, see image

Image


Query Where

Posted: Fri Jun 12, 2015 1:17 pm
by Serhii Kulibaba

Hello Johnny,

This doesn't work because of you didn't add mapping arrow to "where" parameter and use "value" variable inside of it. Please add this arrow.


Query Where

Posted: Fri Jun 12, 2015 2:42 pm
by Johnny7459624

Dude i tried it, see above code not image but the code.I tried mapping both to where and use value. The image part is what i tried.


Query Where

Posted: Mon Jun 15, 2015 4:04 pm
by Serhii Kulibaba

What for other fields (taal, provinsie)? Please remove them. (http://prntscr.com/7h9dph)
If you need use these both parameters, please use JS:

return '{"$and": [{"provinsie": Apperyio("txt_provinsie").text()},{"taal": Apperyio("txt_afr").text()}]}';