OK, apoligies for the rant..<br /><br />After much reading and copying I now get the first record to display in the dropdown. Upon further reading this too is a problem shared by many. Most without resolve. here is my javascript behind the dropdown. Showing the initialize and the click.<br /><br />What I now get is only the first record and this error.<br /><br /> Error: null is not an object<br /><br />CODE BELOW<br /><br />----topmostSubform.Page1.DataDropDownList::initialize: - (JavaScript, client) --------------------<br /><br />/* This dropdown list object will populate two columns with data from a data connection.<br /><br /> sDataConnectionName - name of the data connection to get the data from. Note the data connection will appear in the Data View.<br /> sColHiddenValue - this is the hidden value column of the dropdown. Specify the table column name used for populating.<br /> sColDisplayText - this is the display text column of the dropdown. Specify the table column name used for populating.<br /><br /> These variables must be assigned for this script to run correctly. Replace <value> with the correct value.<br />*/ <br /><br />var sDataConnectionName = "BBCC"; // example - var sDataConnectionName = "MyDataConnection";<br />var sColHiddenValue = "ContactAdmin_Key"; // example - var sColHiddenValue = "MyIndexValue";<br />var sColDisplayText = "JobDescription"; // example - var sColDisplayText = "MyDescription"<br /><br />// Search for sourceSet node which matchs the DataConnection name<br />var nIndex = 0;<br />while(xfa.sourceSet.nodes.item(nIndex).name != sDataConnectionName)<br />{<br /> nIndex++;<br />}<br /><br />var oDB = xfa.sourceSet.nodes.item(nIndex);<br />oDB.open();<br />oDB.first();<br /><br />// Search node with the class name "command"<br />var nDBIndex = 0;<br />while(oDB.nodes.item(nDBIndex).className != "command")<br />{<br /> nDBIndex++;<br />}<br /><br />// Backup the original settings before assigning BOF and EOF to stay<br />var sBOFBackup = oDB.nodes.item(nDBIndex).query.recordSet.getAttribute("bofAction");<br />var sEOFBackup = oDB.nodes.item(nDBIndex).query.recordSet.getAttribute("eofAction");<br /><br />oDB.nodes.item(nDBIndex).query.recordSet.setAttribute("stayBOF", "bofAction");<br />oDB.nodes.item(nDBIndex).query.recordSet.setAttribute("stayEOF", "eofAction");<br /><br />// Clear the list<br />this.clearItems();<br /><br />// Search for the record node with the matching Data Connection name<br />nIndex = 0;<br />while(xfa.record.nodes.item(nIndex).name != sDataConnectionName)<br />{<br /> nIndex++;<br />}<br />var oRecord = xfa.record.nodes.item(nIndex);<br /><br />// Find the value node<br />var oValueNode = null;<br />var oTextNode = null;<br />for(var nColIndex = 0; nColIndex < oRecord.nodes.length; nColIndex++)<br />{<br /> if(oRecord.nodes.item(nColIndex).name == sColHiddenValue)<br /> {<br /> oValueNode = oRecord.nodes.item(nColIndex);<br /> }<br /> else if(oRecord.nodes.item(nColIndex).name == sColDisplayText)<br /> {<br /> oTextNode = oRecord.nodes.item(nColIndex);<br /> }<br />}<br /><br />while(!oDB.isEOF())<br />{<br /> this.addItem(oTextNode.value, oValueNode.value);<br /> oDB.next();<br />}<br /><br />// Restore the original settings<br />oDB.nodes.item(nDBIndex).query.recordSet.setAttribute(sBOFBackup, "bofAction");<br />oDB.nodes.item(nDBIndex).query.recordSet.setAttribute(sEOFBackup, "eofAction");<br /><br />// Close connection<br />oDB.close();<br /><br />----- topmostSubform.Page1.DataDropDownList::click: - (JavaScript, client) -------------------------<br /><br />if (Len(Ltrim(Rtim(SelectField.rawValue))) > 0) then<br /><br /> $sourceset.BBCC.#command.query.commandType = "Text"<br /><br /> $sourceset.BBCC.#command.query.select.nodes.<br /> item(0).value = Concat("Select * from CA_MergeDocs Where ContractAdmin_Key = ",<br /> Ltrim(Rtrim(SelectField.rawValue)) ,"")<br /> <br /> //Reopen the DataConnection<br /> <br />$sourceset.BBCC.open()<br /><br />endif<br /><br />-----------------