I would like to share this, whilst putting this together using nested whiles.
- 1st Table are list of categories
- 2nd Tables are customer's assigned categories
Code: Select all
var cats = table.CATEGORIES.rows;
var owns = tables.OWN_CATEGORIES.rows;
while(cats.next()){
while(owns.next()){
if(tables.CATEGORIES.CAT_ID.value == tables.OWN_CATEGORIES.CAT_ID.value){
log('loop2: ' + tables.OWN_CATEGORIES.CAT_ID.value);
break;
}
}
}
Code: Select all
var cats = table.CATEGORIES.rows;
while(cats.next()){
var owns = tables.OWN_CATEGORIES.rows;
while(owns.next()){
if(tables.CATEGORIES.CAT_ID.value == tables.OWN_CATEGORIES.CAT_ID.value){
log('loop2: ' + tables.OWN_CATEGORIES.CAT_ID.value);
break;
}
}
}