Johnny7459624
Posts: 0
Joined: Tue Mar 31, 2015 7:49 am

Query Where

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

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Query Where

Hello Johnny,

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

Johnny7459624
Posts: 0
Joined: Tue Mar 31, 2015 7:49 am

Query Where

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

Johnny7459624
Posts: 0
Joined: Tue Mar 31, 2015 7:49 am

Query Where

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

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Query Where

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.

Johnny7459624
Posts: 0
Joined: Tue Mar 31, 2015 7:49 am

Query Where

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.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Query Where

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()}]}';

Return to “Issues”