Ellen Schlechter
Posts: 0
Joined: Sun Aug 31, 2014 3:28 am

How to use search to query multiple database columns

I added that and it still doesn't work.

M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

How to use search to query multiple database columns

Doesn't work like in empty result? Or is there an error in the console log or something?

M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

How to use search to query multiple database columns

Like Mr. Yurii had mentioned just have a look in the console and see what parameters the query is being used with
https://d2r1vs3d9006ap.cloudfront.net...

And also confirm if there are records matching those multiple conditions. Having no records matching the criteria is one thing but failing to run a query is another thing

M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

How to use search to query multiple database columns

I'd say start small and narrow down on the problem. Why don't you just add one parameter in your Request parameters and check out the result in the Service Test tab? Then you can add multiple conditions with the $and operator.

Here's an example where the query takes 2 parameters and returns results that match both the conditions

*****************************************************************************************

Image

And ya the query assumes that the column names are "Category" and "Estate"

The result of this (in the Service test tab) will be records matching Category = Confectionery and Estate = Ixora. You can add more parameters....fiddle around with it for a few mins till you get a hang of it

It's pretty straightforward. For the param name just add "where" and the value will be {"$and": [{"Category": "Confectionery"}, {"Estate": "Ixora"}]}

just remember to change the colum names and the looked up values as per your set up

*****************************************************************************************
M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

How to use search to query multiple database columns

And ya your var color statement, there is one extra space in the component name, at the end

var color =Apperyio('mobiletextinput_406color ').val(); // Note extra space in component name

Ellen Schlechter
Posts: 0
Joined: Sun Aug 31, 2014 3:28 am

How to use search to query multiple database columns

Now it acts like it searching but if I search for something that I know shouldn't have any results, it doesn't change anything. This looks right?? Image

The errors in the console are unrelated to this issue.

M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

How to use search to query multiple database columns

Well, you may want to validate couple of things. For example say one of the text / search parameter is not input by the user - you may want to prompt, or handle it.

Empty / null values should always be handled properly otherwise you may end up getting weird results. As for the query parameters, it looks ok. Are you still running into some problems?

Ellen Schlechter
Posts: 0
Joined: Sun Aug 31, 2014 3:28 am

How to use search to query multiple database columns

Well I don't really understand what you just said but it doesn't change what is already displayed on the page.

Ihor Didevych
Posts: 0
Joined: Wed Nov 19, 2014 7:55 pm

How to use search to query multiple database columns

Hi Ellen,
This looks right??
It doesn't change anything.
The result of service are applied only to mapped elements.
What you are planing to change and how did you made implementation of it ?

Return to “Issues”