I am having an issue storing the result of a simple math division of two local VFP variables into a third variable called Multiplier.
<apex:page readOnly="true"
standardController="NCQuote__c"
showHeader="false"
sidebar="False"
applyBodyTag="false"
applyHtmlTag="false">
<!-- SETTING CUSTOM OBJECT NAME -->
<apex:variable var="Obj" value="{!NCQuote__c}" />
<!-- CONFIDENTIAL PRICING CALCULATIONS -->
<apex:variable var="Multiplier" value="{!0}" />
<apex:variable var="TotalNonConfidentialPrice" value="{!0}" />
<apex:variable var="TotalLaborMaterialsSalesPrice" value="{!0}" />
<apex:variable var="C_RollupExtendedConfidentialPrice" value="{!0}" />
<apex:variable var="TotalLaborMaterialsSalesPrice"
value="{!Obj.TotQAmt__c - Obj.TotalPlansSalesPrice__c}" />
<!-- C SPECIALTY ITEM LIST SIZE AND VALUES -->
<apex:repeat value="{!Obj.Specialty_Item_Relationship__r}" var="sir">
<apex:variable var="C_RollupExtendedConfidentialPrice"
value="{!IF(AND(sir.Excluded_Checkbox__c==FALSE,sir.Optional_Checkbox__c==FALSE,
sir.Confidential_Checkbox__c==TRUE),sir.Extended_Confidential_Price__c + C_RollupExtendedConfidentialPrice,C_RollupExtendedConfidentialPrice)}"/>
</apex:repeat>
<!-- CALCULATING TOTAL NON-CONFIDENTIAL PRICE -->
<apex:variable var="TotalNonConfidentialPrice" value="{!TotalLaborMaterialsSalesPrice - C_RollupExtendedConfidentialPrice}"/>
<apex:variable var="Multiplier" value="{!TotalNonConfidentialPrice/TotalLaborMaterialsSalesPrice}"/>
If I save the VFP, I get this error message: "Unknown property 'NCQuote__cStandardController.Multiplier'" Note that If I do any other math operations with the same variables (add, subtraction or multiplication), then I get no issue.
{!TotalNonConfidentialPrice + TotalLaborMaterialsSalesPrice} is OK
{!TotalNonConfidentialPrice - TotalLaborMaterialsSalesPrice} is OK
{!TotalNonConfidentialPrice + TotalLaborMaterialsSalesPrice} is OK
Even dividing the same variable on herself, it gives me an error {!TotalNonConfidentialPrice/TotalNonConfidentialPrice} gives me an error.
I must be missing something simple which I cannot figure out. Any help, it would be appreciated it.
sir.Excluded_Checkbox__c==FALSE
, you can simply write!sir.Excluded_Checkbox__c
orNOT(sir.Excluded_Checkbox__c)
to check for false, andsir.Excluded_Checkbox__c
for true.