Strange issue

It may not be related to the ColdBox per say, but it is a very strange

So the problem is it does not go to the inner loop. I may not see something but the syntax seems correct to me

for (var b = 1;b lte qry1.recordcount;b++){

vat locRule = qry1[“ruleID”][b];
if (locRule gt 1){
here goes qry2
for(var jkk = 1;jkk <= qry2.recordcount;jkk++){
var locTempRuleID = qry2["tempruleID][jkk];



That code will never work, period, which makes me think you just typo’d the hell out of it. How about pasting the code you’re actually using, along with the error message, what you expect to happen, what isn’t happening, etc.? You know, a post that people can actually help you with.

The error message is Variable locTrigger is undefined.

for (var b = 1;b lte fetchPath.recordcount;b++){
var locRule = fetchBodyUserPath[“Rule”][b];
if (locRule gt 1){

fetchTrigger = getModel(“triggerGateway”).fetchTrigger(pathID = 1, BodyID = 2);
the query returns 2 records
for(var l = 1;l lte fetchTrigger.recordcount;l++){
var locTrigger = fetchTrigger[“TRIGGERID”][l];

var locTemptrigger = locTrigger;

so is locRule gt 1?

Yes. The condition is met

Good line debugger could help here…

But my guess would be the outer condition is never true, did you eliminate that?