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

Script to add data pulled from a database

pforms
Registered: Nov 17 2009
Posts: 87

I am generating a form against a table of 50 location names in a database. I don't have access to the database but thought I could add the location address and phone number to the form based on the location pulled from the application.
 
Thought a simple script could do the trick:
 
if (xfa.event.newText==" ")
{form1.bodyPage1.address1.rawValue=""
form1.bodyPage1.address2.rawValue=""
form1.bodyPage1.phone.rawValue=""}
 
The first line is the location pulled from the table.
I would add the address and phone with the script.
 
The form does correctly pull the location name but no address or phone.
 
Is this doable?

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
You'll need to state your question more clearly.

In the code above all the values are empty strings. What do you mean by "pulled from the application?" Do you mean hard coded values? Is there a Data Connection defined for the form. Is it bound to the fields in question? Are any errors reported in the console window?

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script