problem in performing calculation on properties of (list of object) type property
I have a requirement in which I have to find the total (Quantity * price) both of these values are properties of an object for which I created a property named subtotal and made it calculated type but while running its not working.
Add one more "Field" Number(decimal) Property outside of the “ItemList” Page List (List of Objects) and call something like "OrderTotal". Then define it as Calculated(read only). To define its expression, click on the "Open" link to open the Declare Expression Rule form, than define the expression as the "SumOf" "ItemList().Subtotal".
Open the Declare Expression rule for .ItemList().Subtotal and unit test it. There may be something "off" with the syntax of the expression. Remember that Pega is Case Sensitive and make sure all the referenced Properties in the Expression are correctly referenced. Use the Expression Builder in the Declare Expression Rule Form to help you re-build the expression "(.QtyRequested * .UnitPrice)".
If that does not work, delete the Declare Expression, and then Re-Create it again from scratch.