Page 1 of 1

where clause formatting

Posted: Fri Apr 04, 2014 7:56 pm
by Chris Poulos

below hard coded returns only the records filtered by the hikeId as expected.

for (i = 0; i < locationHelper.hikeInfoHikeId.length; i++){
console.log("hikeInfoHikeId:"+ locationHelper.hikeInfoHikeId);
var hikeId=locationHelper.hikeInfoHikeId;
console.log("the hikeId is :"+hikeId);
var result= queryTrailsService_clone_1.execute({
'limit':1500,
data: {where: '{"HIKES_ID":"5339bfbbe4b07b0d8015981e"}'} // THIS WORKS
});

}

Below, the result is not filtered by the hikeId even though the log shows it is set properly as displayed by "console.log("the hikeId is :"+hikeId);" All the values are returned in the result. So I suspect that the syntax is not correct for "data: {where: '{"HIKES_ID":"'+hikeId+'"}'}"

for (i = 0; i < locationHelper.hikeInfoHikeId.length; i++){
console.log("hikeInfoHikeId:"+ locationHelper.hikeInfoHikeId);
var hikeId=locationHelper.hikeInfoHikeId;
console.log("the hikeId is :"+hikeId);
var result= queryTrailsService_clone_1.execute({
'limit':1500,
data: {where: '{"HIKES_ID":"'+hikeId+'"}'} //THIS DOES NOT
});

}

Is the syntax causing the problem ?


where clause formatting

Posted: Fri Apr 04, 2014 8:35 pm
by Maryna Brodina

Hello!

Please post your public app link so we can test it.