Support Topics Documentation Slack YouTube Blog

Geopoints metadata whereClause returns all rows no matter what I put in whereClause

Hello, I imported 6 rows into geopoints:
41.7870431,-88.19962129999999,“locations”,“isStore=true|isEvent=false|start=1/1/2019|end=1/1/2021|name=Store#101”
41.9878565,-88.0518365,“locations”,“isStore=true|isEvent=false|start=1/1/2019|end=1/1/2021|name=Store#201”
32.8916766,-96.9477532,“locations”,“isStore=true|isEvent=false|start=1/1/2019|end=1/1/2021|name=Store#301”
41.8403395,-87.6137011,“locations”,“isStore=false|isEvent=true|start=10/1/2019|end=10/2/2019|name=EventOld”
41.8403395,-87.6137011,“locations”,“isStore=false|isEvent=true|start=10/3/2019|end=10/4/2019|name=EventCurrent”
41.8403395,-87.6137011,“locations”,“isStore=false|isEvent=true|start=10/5/2019|end=10/6/2019|name=EventFuture”

I am using react.js button component and I tried whereClause=“isStore = true”; and I get 6 rows back. What could I be doing wrong?

Hello,

Could you please show sample code which makes the query? (not the entire source code listing, just the Backendless API part)

Regards,
Mark

const searchPoints = (latitude, longitude) => {
//console.log(‘searchPoints’);
//console.log('latitude: ’ + latitude);
//console.log('longitude: ’ + longitude);
const query = new Backendless.GeoQuery();
query.latitude = latitude;
query.longitude = longitude;
query.categories = [‘locations’];
query.includeMetadata = true;
query.radius = ‘300d’;
query.whereClause = “isStore = true”;
query.units = Backendless.Geo.UNITS.YARDS;

//console.log(query);

return Backendless.Geo.find(query);

}

Hello Rober

try to replace query.whereClause = “isStore = true”;
with the following query.condition = “isStore = true”;

Regards, Vlad

That fixed it. Thanks!