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

error - "unknown script"

marpud
Registered: Feb 19 2008
Posts: 8

Hello,

I tried the following example

http://www.adobe.com/devnet/livecycle/articles/lc_designer_db_lookup_tip.pdf

The dropdown list works fine but the button doesnt work.
Everytime it gives me back a script-error without giving any details.

error:
"unknown script (language is formcalc, ...)"

What could be the problem?
Is there another way to fill textboxes with data from an access database?

Can anyone help me?

Markus

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
When you entered the script into LiveCycle Designer you did not set the scripting language. This is a dropdown at the top of the scripting window.

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

marpud
Registered: Feb 19 2008
Posts: 8
hello thomp,

thank you for your answer, it stopped the error.

First I set dropdown on "*initialize javascript client"
and refresh-button on "*click formcalc client" just as the example told me to do
--> I got an errorNow I set dropdown on "*initialize javascript client"
and refresh-button on "*click javascript client"
--> I get no errorBut still the textboxes wont be filled after clicking the refresh-button.

here is the script of the button:

----- form1.#subform[0].Button1::click - (JavaScript, client) --------------------------

if (Len(Ltrim(Rtrim(SelectField.rawValue))) > 0) then$sourceSet.DataConnection.#command.query.commandType = "text"

$sourceSet.DataConnection.#command.query.select.nodes.item(0).value = Concat("Select * from OfficeSupplies Where ID = ", Ltrim(Rtrim(SelectField.rawValue)) ,"")


$sourceSet.DataConnection.open()
endif


I refreshed the dataconnection and the textboxes are also bound to the database.


Do you have an idee how to get this working?

Or how can I populate textboxes with the change event of a dropdown that is connected to a database, so that I don't need the refresh-button.