### Title

Sum of records in field if another field equals value

### Post

I have a row of products that show: ID, Product Name, Travel(checkbox), Discount(checkbox), Qty, Price, Extended Price.

I then have a group of Totals group of fields: Subtotal, Discounts, Travel, Total.

What I am asking is if I can make it so when I click the Discount checkbox, to add the extended price to the Discount totals field.

I am trying to do it with a calculation on the Discount field.

So ideally, this is what I would like except in correct format: if discount field = checked, add to discount field

Thanks - let me know if I am not clear enogh.

This appears to be a portal. If these are repeating fields, you have a bigger problem to fix first.

Add a calculation field to the portal's table, cDiscountedExtendedPrice as:

If ( Discount = 1 ; ExtendedPrice )

Then define the Discount total as: Sum ( PortalTable::cDiscountedExtendedPrice )