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

Dropdown list to show subform (newbie first form)

pmelan
Registered: Dec 2 2009
Posts: 6

I have created a dropdown list when item selected to change sub form to visable and populate fields with data from database. I get data for the dropdown list but when selecting an item from the list I get this error:

Script failed (language is formcalc; context is xfa.[0].form[0].#pageSet[0].state[0].DataDropDownList[0])
script=
var sPropertyName = xfa.event.newText
var sPropertyId = $.boundItem(sPropertyName)

xfa.sourceSet.DataConnection2.#command.query.select =
concat("SELECT PrintName, Title, SignDate FROM tblState WHERE PropertyID = ",
sPropertyId, " ORDER BY Title;")

xfa.sourceSet.DataConnection2.#command.query.commandType = "text"

xfa.sourceSet.DataConnection2.open()
xfa.sourceSet.DataConnection2.first()
StateSub.presence = "visible"

Error: Property: 'select' cannot be set because doing so would violate the document's permissions settings.

Help would be very much appriciated! Thanks,

Pat

My Product Information:
LiveCycle Designer, Windows
NIVA
Registered: Dec 2 2009
Posts: 5
Hello Pat,

It looks like your error is the script language, the error message tells you it is "FormCalc" where it should be set to "JavaScript". You can change this in two areas: 1> for the specific object on your form in the Script Editor window (Select Window, Script Editor) then select "JavaScript" from the language drop-down on the top right. 2> for the entire form, from the Form Properties (Select File, Form Properties, change to the Defaults tab) in the Scripting section, change the Default Language to "JavaScript".