Chris Poulos
Posts: 0
Joined: Tue Apr 01, 2014 2:12 am

where clause formatting

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 ?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

where clause formatting

Hello!

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

Return to “Issues”