I'd do:
Code:
@value += field[trtFinal].value
if (islinkage[attribute] <> 0) then
@value += linkage[attribute].field[trtFinal].value
endif
That way, you don't need to do two steps (leaving out the linkage and setting the tag) to mean the same thing in two different places.