Can I use {sum_amount} in a

The objective is to get the total SUM of a column called "amount" specific to a unique "ordernumber" into a variable, which I can then use to update another table.

Thus assuming ordernumber=1

(in the Forms SQL Where clause ordernumber='1')

and there were say 5 records belonging to ordernumber = 1, each with a value in their respective "amount" field

If I used $Total={sum_amount}, would $Total equal the sum of the column 'amount' for that ordernumber=1

If not what is the most efficient way of doing this?

Thanks in advance

**Form**application in the Events AfterInsert or AfterUpdate or AfterDelete? The emphasis here is this is in a Form app not a Grid.The objective is to get the total SUM of a column called "amount" specific to a unique "ordernumber" into a variable, which I can then use to update another table.

Thus assuming ordernumber=1

(in the Forms SQL Where clause ordernumber='1')

and there were say 5 records belonging to ordernumber = 1, each with a value in their respective "amount" field

If I used $Total={sum_amount}, would $Total equal the sum of the column 'amount' for that ordernumber=1

If not what is the most efficient way of doing this?

Thanks in advance

## Comment