In the drop-down list to pull in file access

HI -.

I'm a beginner to this bear so please with me.  I know that have been discussed a hundred times but I can't seem to find someone else who is having this specific problem.

I have v8.2.

Given that my script was not working, I downloaded the document "Adobe LiveCycle Designer 7.0, providing research of the interactive database of forms" to try to see if I can understand what is happening.

I built exactly as in the document except for the addition of 'clone (1)' as needed based on what I found in other messages on v8.2 and errors before.

Drop-down list:

/ * This object listbox will fill two columns with data from a data connection.

sDataConnectionName

-the name of the data connection to get the data.

-Note that the data connection appears in the data view.

sColHiddenValue

-It is the hidden value of listbox column.

-Specify the name of the table column used for the fill.

sColDisplayText

-It is the column of the ListBox display text.

-Specify the name of the table column used for the fill.

These variables must be assigned for this script runs correctly.

*/

var sDataConnectionName = "DataConnection;

var sColHiddenValue = "ID";

var sColDisplayText = "PART_NO."

Search for sourceSet node that match the name of DataConnection

var nIndex = 0;

While (xfa.sourceSet.nodes.item (nIndex) .name! = sDataConnectionName)

{

nIndex ++;

}

oDB = xfa.sourceSet.nodes.item (nIndex) .racing var (1);

oDB.open ();

oDB.first ();

Search with the command 'class name' node

nIndex = 0;

While (oDB.nodes.item (nIndex) .className! = 'command')

{

nIndex ++;

}

Define BOF and EOF to stay

.query.recordSet.setAttribute ("stayBOF", "bofAction"), oDB.nodes.item (nIndex);

.query.recordSet.setAttribute ("stayEOF", "eofAction"), oDB.nodes.item (nIndex);

Find the record with the corresponding data connection name

nIndex = 0;

While (xfa.record.nodes.item (nIndex) .name! = sDataConnectionName)

{

nIndex ++;

}

var oRecord = xfa.record.nodes.item (nIndex);

Find the value

var oValueNode = null;

var oTextNode = null;

for (var nColIndex = 0; nColIndex < oRecord.nodes.length; nColIndex ++)

{

If (oRecord.nodes.item (nColIndex) .name is sColHiddenValue)

{

o

ValueNode = oRecord.nodes.item (nColIndex);

}

ElseIf (oRecord.nodes.item (nColIndex) .name == sColDisplayText)

{

o

Node = oRecord.nodes.item (nColIndex);

}

}

While (!) ODB. IsEOF())

{

this.addItem (oValueNode.value, oValueNode.value);

IDList.addItem (oValueNode.value, oTextNode.value);

oDB.next ();

}

Close connection

oDB.close ();

Button:

If (Len (Ltrim (Rtrim (SelectField.rawValue))) > 0) then

$sourceSet.DataConnection.clone (1). #command.query.commandType = "text".

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

Reopen the Dataconnection

$sourceSet.DataConnection.clone (1) .open)

endif

Preview PDF and it connects OK, menu drop down fills properly, but when I click the button, it ALWAYS fills the data from the first record (no matter what is selected in the drop-down list).  It's the same problem I had with my own build.

Anyone have any ideas of what I have wrong?

Thank you!

Misty

The other thing, that I just noticed is that I usually clone the entire connection and not each node in the link that you have. Try changing your code for this:

var nIndex = 0;
While (xfa.sourceSet.nodes.item (nIndex) .name! = "DataConnection2")

nIndex = nIndex + 1
endwhile

oDB = xfa.sourceSet.nodes.item (nIndex) .racing var (1); pertaining to the specified data connection node
Configure sql call DB to get the details about MNR

If (HasValue (SelectID)) then

oDB.nodes.item (1).query.setAttribute ("text", "commandType");

sqlString var = Concat ("SELECT * FROM drugs WHERE MRN = '", Ltrim (Rtrim (SelectID.rawValue)), "'")

oDB.nodes.item (1).query.select.nodes.item (0) .value = sqlString.

now connect to the DB and get a recording
oDB.open)
oDB.close ();

endif

Also if you copy and paste code quotes always get screwed up... .you will have to type.

Paul

Tags: Adobe LiveCycle

Similar Questions

Maybe you are looking for

  • HP Envy 5530 incompatible cartridges

    Just buy new printer HP Envy 5530. Provided with the printer ink cartridges are HP 301 black & TriCol in sealed bags. Have removed all the Ribbon, inserted cartridges properly and loaded paper. Get error message - cartridges are incompatible with the

  • G 430 W Lan problem

    I have Lenovo 3000 G430 laptop, I used Windows 7 32-bit before, but now I upgraded to 64-bit, now the problem is that my Lan & Bluetooth drivers are not getting recognized despite them installed from the support page. It says "W Lan Switch located in

  • I can install it on multiple computers?

    I'm buying a copy of Vista Ultimate. I have a desktop and a laptop. I can install it on TWO computers? Or I have to buy two copies to do this? Does anyone know for sure? Thank you!

  • After coming back to Windows 7 after only 10 proved to be unsatisfactory now, Microsoft is trying to drive me to 10

    Earlier this week I finally gave in the constant nagging and installed Windows 10 to replace my copy of Windows 7.  After a few days, I managed to get out me of my computer by setting up a password that I thought was for access to MSM for Windows' ne

  • Billboard on new Bold 9900 blackBerry Smartphones

    Hello Somehow my display of the home screen is now display 2 lines of my applications, which I don't like. How do I change it back just for a single line of applications on the home screen? help much appreciated!