function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Lisa SeilerLisa Seiler 

Quote Sum Line Items

Hi @ All,
I have found this post:
https://developer.salesforce.com/forums/?id=906F000000096RJIAY

So, I want to try sum all "Quote Line Items" at my Visualforce Page.
I catch all items with "repeat" and have to try sum all items with the link below. I get following error-message:
Error: Incorrect parameter type for function 'not()'. Expected Boolean, received Number
I found no way to understand it....
My code at the visualforce-page look like this:
<apex:variable var="Sum" value="{!0}" />
    <apex:repeat var="qli" value="{!QuoteLineItems}">
        ....
    <apex:variable var="Sum" value="{!Sum+!qli.Quantity}" />
</apex:repeat>

"Quantity" is the default-number-field from Quote.
Is someone able to help me?

Best,
Lisa
(Sorry for the bad english ;-) )

 
Lisa SeilerLisa Seiler
I have found the problem.
I only need to use {!} once time at this point:
<apex:variable var="Sum" value="{!0}" />
    <apex:repeat var="qli" value="{!QuoteLineItems}">
        ....
    <apex:variable var="Sum" value="{!Sum+!qli.Quantity}" />
</apex:repeat>
tuns to:
<apex:variable var="Sum" value="{!0}" />
    <apex:repeat var="qli" value="{!QuoteLineItems}">
        ....
    <apex:variable var="Sum" value="{!Sum+qli.Quantity}" />
</apex:repeat>


Best,
Lisa