Use Case :
we have 2 tables PayOrders and PayOrderTrans
we have 2 tables PayOrders and PayOrderTrans
we need to : sum Credit column in PaymentOrderTrans table
- First create New Attribute called CreditTotal
- Go to Default Value section
- Choose Expression
- Enter the following expression
object.getRowSet().sum('Credit')
What about the Null value ?
to avoid null value, you must modify the expression to
object.getRowSet().sum('Credit != null ? Credit : 0 ')
well done
ReplyDelete