Page 1 of 1

Problem filtering text string data in mapping.

Posted: Mon Jan 16, 2017 8:20 am
by Deon

Hi

I am trying to retrieve data based on a text string filter. The problem is that appery is converting my ' character to %27.

In Test tab of the appery query service, the character ' is recognized perfectly (and not converted) Data based the filter is retrieved perfectly. So why does it not work when I create the js filter accordingly in the mapping. Why is appery converting my ' character instead of leaving it as is?

This is my code
return('email='+ "'" +value+ "'"+'');

Filtering on numbers works fine as the ' character is not used.


Problem filtering text string data in mapping.

Posted: Mon Jan 16, 2017 2:36 pm
by Serhii Kulibaba

Hello Deon,

This is default safe-url methd to change quotes: http://stackoverflow.com/questions/69...

Please use JS below there if you need to send data with them:
prereturn "email=\'" + value + "\'";/pre


Problem filtering text string data in mapping.

Posted: Wed Jan 18, 2017 12:17 pm
by Deon

Great thank you. The following code as I had it works as well. I had to clear the cache again for it to work.

return('email='+ "'" +value+ "'"+'');


Problem filtering text string data in mapping.

Posted: Thu Feb 02, 2017 3:53 pm
by Deon

can close this ticket