Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

JavaScript Sum Help

$
0
0

Hi Folks,

 

I have a LiveCycle purchase request form that calculates a grand total. If that grand total is equal to or greater than $1,000.00 the subform "comparativeBids" should be made visible. The calculation works fine in FormCalc but not in JavaScript. Can someone help me figure how to make the JavaScript calculation work? I am not familiar with FormCalc enough to write conditional statements using that language but I am open to using it is someone can provide the script.

 

Anyway, here is my JavaScript for grandTotal (calculate event):

 

PRForm.generalInfo.totalGroup.totalTable.grandTotalRow.grandTotal::cal culate - (JavaScript, client)

 

this.rawValue = subtotalRow.subtotal + taxRow.tax + shippingRow.shipping;

   

comparativeBids.presence = "hidden";

 

var order= xfa.resolveNode("PRForm.generalInfo.totalGroup.totalTable.grandTotalR ow.grandTotal").rawValue;

if (order >= 1000) {

    comparativeBids.presence = "visible";

}

 

Note: I have also tried the calculation as this.rawValue = subtotalRow.subtotal.rawValue + taxRow.tax.rawValue + shippingRow.shipping.rawValue; --- again no success with the JavaScript version.

 

Thanks in advance for the help!


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>