Yes I had that same idea today and it almost works, but it seems like the repeats are summed like strings instead of numbers when the if statement is used. So when I do if(${cond1}='n' and ${cond2}='n', 1,0) they are summed like this - 1st iteration = 1, 2nd = 11, 3rd = 111 and so on. Can I use the bind ESRI type to override it? Thanks, cob