Planet PDF Forum Archive

Planet PDF ForumWowsers! This is page is old, head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner to in-depth developer and pre-press discussions. If you wish to continue... one & two archive covers 1999-2011 (160,000 pages).

New Forum | Previous | Next | (P-PDF) Beginners

Topic: If then statement to evaulate an alphanumeric string
Conf: (P-PDF) Beginners, Msg: 131628
From: legalbeagle
Date: 4/23/2005 04:08 AM

I would like to create a form that evaluates words to force a calculation in a final column after evaluating five possibilities.

here is what i have so far:

var p1 = this.getField("PAGES1");
var n1 = this.getField("NAMES1");
var pp = this.getField("PURCHASEPRICE");
var ma = this.getField("MORTGAGEAMOUNT");
var ma2 = this.getField("MORTGAGEAMOUNT2");
var desc1 = this.getField("DESCRIPTION1");
var dsd1 = pp.value * .007;
var dsm1 = ma.value * .0035;
var dsm2 = ma2.value * .0035;
var int1 = ma.value * .002;
var int2 = ma2.value * .002;
var n1 = n1.value - 4;
var a1 = ((p1.value - 1) * 8.50) + 10.00;

if ("desc1") = ("Recording")
event.value = a1 + (n1 * 1.00);

elseif ("desc1") = ("Documentary Stamps First Mortgage")
event.value = dsm1.value;

elseif ("desc1") = ("Intangible Tax First Mortgage")
event.value = int1.value;

elseif ("desc1") = ("Documentary Stamps Second Mortgage")
event.value = dsm2.value;

elseif ("desc1") = ("Intangible Tax Second Mortgage")
event.value = int2.value;


I just need the correct syntax for the if then portion of the formula. Any suggestions?


PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link...

Download free demo

Debenu PDF Tools Pro

It's simple to use and will let you preview and edit PDF files, it's a Windows application that makes...

Download free demo

Five visions of a PDF Day

In the world of PDFs or as we like to say Planet (of) PDF, a year isn't a real PDF year without an intense few days of industry knowledge sharing.

May 15, 2018
Platinum Sponsor

Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.


Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.