So I have been doing some more tests and am trying to use the scripting inside of the Infopath Form. I have an event that fires once the database query is done. This seems to work fine. I have the following vbscript code that I am using to just try to get the first part (name) inserted programmatically:
Dim faname, faemail, faphone
Dim oNode, oName, oEmail, oPhone, oAttr
faname = XDocument.DOM.SelectSingleNode("//dfs:myFields/dfs:dataFields/d:Contracts/@FA_Name").Text '(These lines work!)
faemail = XDocument.DOM.SelectSingleNode("//dfs:myFields/dfs:dataFields/d:Contracts/@FA_Email").Text
faphone = XDocument.DOM.SelectSingleNode("//dfs:myFields/dfs:dataFields/d:Contracts/@FA_Phone").Text
oNode = getNode("//my:BlockDetail")
oName = XDocument.DOM.createNode(1, "DIV", "http://www.w3.org/1999/xhtml")
oAttr = XDocument.DOM.createNode(2, "title", "")
oAttr.Text = faname
oName.attributes.setNamedItem(oAttr)
oNode.appendChild(oName)
The rich text box is not updating with this code and I still have not really found much to help me get this working...