Hi,
I created a form in LiveCycle that pulls in information from a local access database.
Can I create a button that (that shows in reader) will pull the latest info from that database - when the user is in Reader? (Kind of like the Forms -> Manage Forms -> Import Data in Acrobat Pro.)
Or is there a way to edit a LiveCycle form in Acrobat Pro and add the button there?
Jess
If you want to run it on a LiveCycle form there is an easy way. Open the LC form in Acrobat Pro and add a bookmark action. The bookmark action can be run from a button click on the form with this code
event.target.bookmarkRoot.children[0].execute();
But unfortunately this won't work on a dynamic LiveCycle form. The first reason is that FDF imports into PDF form fields. There are no such fields on a dynamic form, they only exist on a static LC form. The second reason is the field names in LC are really paths through the hirearchy. It's very difficult to build an FDF with the correct format. And the last reason is that an FDF imports data into PDF form fields, not the LC data model where it needs to go to be saved with the form.
There are some fancy workarounds you could do. For example, attach a regular AcroForm to the LC form. Then do updates to the form data through this attachment.
However, I understand this data workflow you're trying to implement is for a controlled environment. If you have a server you have another option. Write a server script to access the DB. Then use data submits to update the user forms. Forget about using FDF on a LiveCycle form.
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]
Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script