These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Simple Calculation

winlam
Registered: Nov 25 2008
Posts: 2

Hi,

Can someone guide me a script to the following?:

if (field.rawvalue >400k)
{
app.alert("This amount cannot be more than 400k");
}

i just can't get it working.... :(

Someone please help...

radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Hi,

make shure you set the script editor to JavaScript not FormCalc.

Then put a script like this into the calculation event of your field.

**************************************************************
if (this.rawValue > 400000)
{
app.alert({cMsg:"This amount cannot be more than 400k!", nIcon: 1, nType: 0} );
//Set the amount to 400k
this.rawValue = "400000";
}
**************************************************************

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs