Expand my Community achievements bar.

LiveCycle Designer 8-scripting search Access DB records

Avatar

Former Community Member
Hi



I am new to LiveCycle Designer 8 having it included with Acrobat Pro 8. I have been trying to set up a basic form that can interact with an Access 2007 DB. Following the help guide, online tutorials, I have been able to set up the data connection, figure out how to establish a "trusted environment" and added several buttons as a test. Using JS, the next, previous, update, first and last buttons work, populating the form fields with the sample DB data and updating the DB (update). Can't get the add new record button to work even though the JS scripting is precisely that shown in the same tutorials for the other buttons. If I delete the text in the on screen cells in the .pdf form, enter new text, click add, all that I added disappears. Checking the DB, nothing has been added. Same difficulty with deleting a record, and the current opened record does not delete.



Reading a posting suggesting setting up an SQL query instead, leaving of any auto-incrementing item (like ID), and using the JS scripting for the button (don't yet know how to use SQL for next, previous, update, etc.), still couldn't get the add new or delete to work. Tried every combo of no user name, no password to user name, password blank, etc. No success.



The other needed capability for the test form is the ability to search the DB records, for example by name or ID, for example by the user entering a name or ID in a text input box, clicking a "search" button and the record (if it exists) displaying in the other cells. Then, once found, it could be updated or deleted. One tutorial aims to populate a drop down list box with the data from a specific DB column. It doesn't use JS, rather FormCalc (which kept generating error messages, when I tested it out))and is far too complex for my limited novice skills. If I could display a drop down list box with all of the names and ID's in a DB, the user could choose one and once the record would populate the cells, they could update or delete it.



So, I'm stuck. Can't get the add new or delete to work and can't figure out how to set up a search to identify records for update or delete. I've read and read anything I can find online, in the Adobe knowledge base, forum, blog postings, trying out many ideas without any success.



I am hoping someone can help with some suggestions, sample scripts, hopefully understandable by a beginner.



Any help would be appreciated.



Kind Regards,

Stephen

swartel@nycap.rr.com
0 Replies