Constraint for row total with each element in the array less than a given value

In reply to dave_59:

Hello Dave, thank you for your reply. All three rows are getting constrained now.

However, when I try to constrain the column total to be 100 rather than row, I replaced i with j in the line:

array[i].sum(item) with (int'(item))==100;}}

but I got some errors. Why is it that so? I thought the ‘i’ in array[i].sum() was to indicate we were referring to the row, and hence a ‘j’ should refer to a column.