- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hi,
If we assume your table row is called itemRow and there is a field called costItem (which can be Yes or No ... should this be a text feild) and a field called amount (that you want to sum up), I would use the following code in the calculate event of the field displaying the result.
var sum = 0;
for (var i=0; i<_itemRow.count; i++)
{
if (itemRow.all.item(i).costItem.rawValue == "Yes")
{
sum += itemRow.all.item(i).amount.rawValue;
}
}
sum;
Good luck
Bruce
Views
Replies
0 Likes
Total Likes