Page 1 of 1

Search Query not working

Posted: Fri Nov 13, 2015 12:00 am
by Deon

Hi

I am querying a sql database. When I use the test functionality of the service I query successfully as can be seen from this screenshot.
Image

The problem is, that I have tried various syntax in the mapping query editor such as....
return('Location Like '%'+value+'%'');
return('Location Like "%'+value+'%"');
return('Location Like "''+value+'%'');
etc etc but nothing works.

If I do this
return('Location Like '+value+''); and the value is numeric it does not fail but the % cannot be used and I am actually querying a text field and not a numeric field.

Can you tell me what the equivalent syntax should be to match that of the syntax in the test screenshot? As you can see the tester does not display the whole url either?

Thank you


Search Query not working

Posted: Fri Nov 13, 2015 7:49 am
by Serhii Kulibaba

Hello Deon,

Could you compare request data from the Appery.io service and another REST client?


Search Query not working

Posted: Fri Nov 13, 2015 8:33 pm
by Deon

Hi

I dont understand what you are asking? What other rest client. What must I compare?.

All I need to know is what syntax must I use in the jquery editor to achieve the same result as I get when testing the service.


Search Query not working

Posted: Sat Nov 14, 2015 4:09 pm
by Serhii Kulibaba

What do you mean by "jquery editor"? Do you need to post data with jQuery request as with Appery.io service? Please look at this example: http://jsfiddle.net/3y5p81dh/13/