Integrated Application Platform › Forums › General › counting based on more than two members of an object from inside a loop › Reply To: counting based on more than two members of an object from inside a loop
February 14, 2015 at 8:29 am
#1152
Keymaster
You could build the code the same way you would build the query where and then use string.Eval. You would need to write it as a function and pass in the arguments. But that should not be necessary.
If you make a list of the field names then you can just loop through them.
function (row, fields)
{
for f in fields
if row[f] isnt true
return false
return true
}
The first time the list would just have one field, the second time two fields, etc.
Is that more what you are looking for?