<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Qdabra Database Accelerator</title><link>https://www.infopathdev.com:443/forums/61.aspx</link><description>Qdabra Database Accelerator (DBXL) simplifies connecting InfoPath to SQL Server and SharePoint for codeless storage, permissions, workflow, and reporting on InfoPath forms. This forum also supports users of Qdabra's WSSP.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Copy/Clone data from DBXL Secondary Data Connection to InfoPath 2003 Repeating table in Main Data in JS</title><link>https://www.infopathdev.com:443/forums/thread/44380.aspx</link><pubDate>Wed, 15 Jul 2009 15:23:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44380</guid><dc:creator>kennebg</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44380.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=61&amp;PostID=44380</wfw:commentRss><description>&lt;p&gt;I had tried almost the same thing but did not have the .text in building the string.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you Thank you Thank you!!&lt;/p&gt;</description></item><item><title>Re: Copy/Clone data from DBXL Secondary Data Connection to InfoPath 2003 Repeating table in Main Data in JS</title><link>https://www.infopathdev.com:443/forums/thread/44377.aspx</link><pubDate>Wed, 15 Jul 2009 15:18:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44377</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44377.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=61&amp;PostID=44377</wfw:commentRss><description>&lt;p&gt;Just get your main data source field value the way you have other main data source fields in your script:&lt;/p&gt;
&lt;p&gt;var field = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:TopLevelInput&amp;quot;);&lt;/p&gt;
&lt;p&gt;Then, you can do something like this:&lt;/p&gt;
&lt;p&gt;query.text = &amp;quot;&amp;lt;query&amp;gt;&amp;lt;filter&amp;gt;&amp;lt;eq&amp;gt;&amp;lt;column name=&amp;#39;Title&amp;#39;/&amp;gt;&amp;lt;value&amp;gt;&amp;quot; + field.text + &amp;quot;&amp;lt;/value&amp;gt;&amp;lt;/eq&amp;gt;&amp;lt;/filter&amp;gt;&amp;lt;/query&amp;gt;&amp;quot;;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Copy/Clone data from DBXL Secondary Data Connection to InfoPath 2003 Repeating table in Main Data in JS</title><link>https://www.infopathdev.com:443/forums/thread/44374.aspx</link><pubDate>Wed, 15 Jul 2009 15:00:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44374</guid><dc:creator>kennebg</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44374.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=61&amp;PostID=44374</wfw:commentRss><description>&lt;p&gt;Thanks Hillary.&amp;nbsp; The static query works but I need to pass a variable to the query.&amp;nbsp; I have tried to concat everyway I can think of the string to pull in the input field which is in the main.&amp;nbsp; I copied the code generated by Query Builder and I copied the piece of code that I was using in the Rule to set the query field of the secondary DBXL but the script will blow for various reasons. I&amp;#39;ve used&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;xdXDocument:get-DOM()/my:myFields/my:TopLevelInput&lt;/p&gt;
&lt;p&gt;&amp;nbsp;which is what Query Builder generates but when I put this in the form will not load with a &amp;quot;expecting )&amp;quot; error but I am not missing any right parens. I&amp;#39;ve tried using the &lt;/p&gt;
&lt;p&gt;XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:TopLevelInput&amp;quot;)&lt;/p&gt;
&lt;p&gt;They either blow on form load or if the form loads then when it executes it get an Object Required error.&lt;/p&gt;
&lt;p&gt;I swear I have never had this much trouble with code before!&amp;nbsp; I wrote COBOL for years and then VB but this script stuff is crazy!!!&lt;/p&gt;
&lt;p&gt;Thanks for your help!!!&lt;/p&gt;</description></item><item><title>Re: Copy/Clone data from DBXL Secondary Data Connection to InfoPath 2003 Repeating table in Main Data in JS</title><link>https://www.infopathdev.com:443/forums/thread/44346.aspx</link><pubDate>Tue, 14 Jul 2009 21:19:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44346</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44346.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=61&amp;PostID=44346</wfw:commentRss><description>&lt;p&gt;For example:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; var query = XDocument.GetDOM(&amp;quot;GetListItemsStr&amp;quot;).selectSingleNode(&amp;quot;/dfs:myFields/dfs:queryFields/tns:GetListItemsStr/tns:query&amp;quot;);&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; query.text = &amp;quot;&amp;lt;query&amp;gt;&amp;lt;filter&amp;gt;&amp;lt;eq&amp;gt;&amp;lt;column name=&amp;#39;Title&amp;#39;/&amp;gt;&amp;lt;value&amp;gt;Test&amp;lt;/value&amp;gt;&amp;lt;/eq&amp;gt;&amp;lt;/filter&amp;gt;&amp;lt;/query&amp;gt;&amp;quot;&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; XDocument.DataObjects[&amp;quot;GetListItemsStr&amp;quot;].Query();&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;The first line gets the &amp;#39;query&amp;#39; field in the queryFields of the data connection. The second line sets the value to our new query (mine filters out any items that don&amp;#39;t have title equal to Test) and the third actually executes the query to retrieve the data. Hope that helps!&lt;/p&gt;</description></item><item><title>Re: Copy/Clone data from DBXL Secondary Data Connection to InfoPath 2003 Repeating table in Main Data in JS</title><link>https://www.infopathdev.com:443/forums/thread/44328.aspx</link><pubDate>Tue, 14 Jul 2009 19:26:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44328</guid><dc:creator>kennebg</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44328.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=61&amp;PostID=44328</wfw:commentRss><description>&lt;p&gt;OK.&amp;nbsp; I lied!&amp;nbsp; Well not really.&amp;nbsp; I have progressed nicely since this morning.&amp;nbsp; Everything is going fine but I moved on to finishing the code for this.&amp;nbsp; What I now need to do is combine the query function to DBXL with the rest of the code.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;I had been doing the query in Rules but now I want to call the query from script instead so I can do it in one click.&amp;nbsp; I know that query builder makes code to insert in code but what I can&amp;#39;t seem to do is set the query field in the DBXL connection from script so that I can then execute the query and get the results back.&lt;/p&gt;
&lt;p&gt;Again, I&amp;#39;m sure it&amp;#39;s simple but in my search in infopathdev I have not found what I&amp;#39;m trying to do so far.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m thinking we&amp;#39;re talking one or two lines of code to set the query field(currently performed in a rul) to the query string. Then code to cause the query to the DBXL connection to occur.&lt;/p&gt;
&lt;p&gt;Thanks again and I hope that all my grief benefits other vistors to this forum!&lt;/p&gt;</description></item><item><title>Re: Copy/Clone data from DBXL Secondary Data Connection to InfoPath 2003 Repeating table in Main Data in JS</title><link>https://www.infopathdev.com:443/forums/thread/44309.aspx</link><pubDate>Tue, 14 Jul 2009 15:56:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44309</guid><dc:creator>kennebg</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44309.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=61&amp;PostID=44309</wfw:commentRss><description>&lt;p&gt;Well Hillary to not be a Java Script girl you are doing wonderfully.&amp;nbsp; That did it.&amp;nbsp; I had tried similar combinations all around that but had not hit that combination I guess.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Works like a charm. Now lets try and add all the other fields and see what I get into!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I&amp;#39;ll leave you alone for the rest of today unless I hit some huge roadblock.&lt;/p&gt;
&lt;p&gt;Thanks Again!!!&lt;/p&gt;</description></item><item><title>Re: Copy/Clone data from DBXL Secondary Data Connection to InfoPath 2003 Repeating table in Main Data in JS</title><link>https://www.infopathdev.com:443/forums/thread/44307.aspx</link><pubDate>Tue, 14 Jul 2009 15:40:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44307</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44307.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=61&amp;PostID=44307</wfw:commentRss><description>&lt;p&gt;Your script is different from my sample. You are selecting the &lt;strong&gt;text&lt;/strong&gt; of the node. If the node is null, you&amp;#39;ll get an object required error when you try to select &lt;strong&gt;text&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;So, what you have:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; var field11 = newTestDetails.selectSingleNode(&amp;quot;my:field11&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;XDocument.UI.Alert(node.selectSingleNode(&amp;quot;Diameter&amp;quot;).text.length);&lt;/strong&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (node.selectSingleNode(&amp;quot;Diameter&amp;quot;).length != 0)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var diameter = node.selectSingleNode(&amp;quot;Diameter&amp;quot;).text;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (diameter != &amp;quot;&amp;quot; &amp;amp; field11.getAttribute(&amp;quot;xsi:nil&amp;quot;));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;field11.removeAttribute(&amp;quot;xsi:nil&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;field11.text = diameter;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Could be:&lt;/p&gt;
&lt;blockquote&gt;
&lt;div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font face="Courier New"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;"&gt; field11 = newTestDetails.selectSingleNode(&lt;font color="#a31515"&gt;&amp;quot;my:field11&amp;quot;&lt;/font&gt;);&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font face="Courier New"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;"&gt; diameter = node.selectSingleNode(&lt;font color="#a31515"&gt;&amp;quot;Diameter&amp;quot;&lt;/font&gt;)&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font color="#008000" face="Courier New"&gt;//check to see if the diameter node is null&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font face="Courier New"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;"&gt; (&lt;font color="#0000ff"&gt;null&lt;/font&gt; != node.selectSingleNode(&lt;font color="#a31515"&gt;&amp;quot;Diameter&amp;quot;&lt;/font&gt;))&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font face="Courier New"&gt;{&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&lt;font color="#008000"&gt;//if it isn&amp;#39;t null, check to see if the field has a value&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;if&lt;/font&gt; (diameter.text != &lt;font color="#a31515"&gt;&amp;quot;&amp;quot;&lt;/font&gt;)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#008000"&gt;//if the field has a value, check for the nil attribute&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;if&lt;/font&gt;(field11.getAttribute(&lt;font color="#a31515"&gt;&amp;quot;xsi:nil&amp;quot;&lt;/font&gt;))&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#008000"&gt;//remove nil if present&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;field11.removeAttribute(&lt;font color="#a31515"&gt;&amp;quot;xsi:nil&amp;quot;&lt;/font&gt;);&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#008000"&gt;//set the field to the diameter value if diameter.text has a value &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; field11.text = diameter.text;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font face="Courier New"&gt;}&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;</description></item><item><title>Re: Copy/Clone data from DBXL Secondary Data Connection to InfoPath 2003 Repeating table in Main Data in JS</title><link>https://www.infopathdev.com:443/forums/thread/44304.aspx</link><pubDate>Tue, 14 Jul 2009 15:20:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44304</guid><dc:creator>kennebg</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44304.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=61&amp;PostID=44304</wfw:commentRss><description>&lt;p&gt;Here&amp;#39;s the current script.&amp;nbsp; I added the Alert for the length of the node just for debuggin.&amp;nbsp; It will show me the node size for the records just fine up until it hits that one where this none has not been filled in yet and I Object Required.&lt;/p&gt;
&lt;p&gt;I had already tried to test for null just like mentioned:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;var field = node.selectSingleNode(&amp;quot;Diameter&amp;quot;);&lt;/p&gt;
&lt;p&gt;but this line will error out with object required.&lt;/p&gt;
&lt;p&gt;So I was trying to use the length thinking that if it was zero I could identify it that way but it still comes back with object required.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;/ Get a copy of the main DOM node. &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var clone = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:group3/my:Test_Details&amp;quot;).cloneNode(true); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Copy nodes from 2DS to main DOM. &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var nodes = XDocument.GetDOM(&amp;quot;GetListItemsStr&amp;quot;).selectNodes(&amp;quot;/dfs:myFields/dfs:dataFields/ns1:GetListItemsStrResponse/ns1:GetListItemsStrResult/Rows/row&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var node;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(node = nodes.nextNode()) &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var newTestDetails = clone.cloneNode(true);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newTestDetails.selectSingleNode(&amp;quot;my:field10&amp;quot;).text = node.selectSingleNode(&amp;quot;Test_Serial_Number&amp;quot;).text;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //newTestDetails.selectSingleNode(&amp;quot;my:field11&amp;quot;).text = node.selectSingleNode(&amp;quot;Diameter&amp;quot;).text;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var field11 = newTestDetails.selectSingleNode(&amp;quot;my:field11&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;XDocument.UI.Alert(node.selectSingleNode(&amp;quot;Diameter&amp;quot;).text.length);&lt;/strong&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (node.selectSingleNode(&amp;quot;Diameter&amp;quot;).length != 0)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var diameter = node.selectSingleNode(&amp;quot;Diameter&amp;quot;).text;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (diameter != &amp;quot;&amp;quot; &amp;amp; field11.getAttribute(&amp;quot;xsi:nil&amp;quot;));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;field11.removeAttribute(&amp;quot;xsi:nil&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;field11.text = diameter;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:group3&amp;quot;).appendChild(newTestDetails); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;// Write your code here&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Copy/Clone data from DBXL Secondary Data Connection to InfoPath 2003 Repeating table in Main Data in JS</title><link>https://www.infopathdev.com:443/forums/thread/44302.aspx</link><pubDate>Tue, 14 Jul 2009 15:10:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44302</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44302.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=61&amp;PostID=44302</wfw:commentRss><description>&lt;p&gt;Hey, could you also post the most recent copy of your script, in case there is something else going wrong? Because the field should be there, even if it doesn&amp;#39;t have data...so it seems like something else might be the problem.&lt;/p&gt;</description></item><item><title>Re: Copy/Clone data from DBXL Secondary Data Connection to InfoPath 2003 Repeating table in Main Data in JS</title><link>https://www.infopathdev.com:443/forums/thread/44301.aspx</link><pubDate>Tue, 14 Jul 2009 15:09:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44301</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44301.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=61&amp;PostID=44301</wfw:commentRss><description>&lt;p&gt;To test for whether a field is null, using the node variable declared in your while loop:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;var field = node.selectSingleNode(&amp;quot;Diameter&amp;quot;);&lt;/p&gt;
&lt;p&gt;if (null == field)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; //do something&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; //do something else&lt;br /&gt;}&lt;/p&gt;&lt;/blockquote&gt;</description></item><item><title>Re: Copy/Clone data from DBXL Secondary Data Connection to InfoPath 2003 Repeating table in Main Data in JS</title><link>https://www.infopathdev.com:443/forums/thread/44297.aspx</link><pubDate>Tue, 14 Jul 2009 14:46:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44297</guid><dc:creator>kennebg</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44297.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=61&amp;PostID=44297</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;OK,&amp;nbsp; It still appears that since that field is not populated it is just not there?&amp;nbsp; It keeps giving me an object required error when I get to that point.&amp;nbsp; I tried using the null comparison but that doesn&amp;#39;t work either.&amp;nbsp; I tried using .length and it gives me the lengths for the items up to the one without anything and then still will blow for an object required.&amp;nbsp; So it&amp;#39;s really like it does not exist yet.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Can anyone tell me how to test to see if an object exists before I try to reference it which blows the script up?&amp;nbsp; I don&amp;#39;t really want to fill the fields with blanks or zeros when the record is created because there are valid reasons that it may not yet have been filled in.&amp;nbsp; I guess I could set them all to spaces when the record is created and perhaps that would solve the problem but I would think there is more elegant way to deal with it?&amp;nbsp; Also, just in case because one could get by and I don&amp;#39;t want it blowing up if it does.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;If someone has experienced this and knows what to do, please share with me.&amp;nbsp; I may be on the completely wrong track but since it works fine until it gets to the record where the field has not been populated and the error I get is Object Required then I am assuming it means the object doesn&amp;#39;t exist?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Hillary, thanks so much for all your help on this and I&amp;#39;m in good shape if I can learn how to test for this.&lt;/p&gt;</description></item><item><title>Re: Copy/Clone data from DBXL Secondary Data Connection to InfoPath 2003 Repeating table in Main Data in JS</title><link>https://www.infopathdev.com:443/forums/thread/44248.aspx</link><pubDate>Mon, 13 Jul 2009 21:36:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44248</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44248.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=61&amp;PostID=44248</wfw:commentRss><description>&lt;p&gt;The field should exsist in the secondary data source -- it will just have a blank value. You should remove this line:&amp;nbsp;newTestDetails.selectSingleNode(&amp;quot;my:field11&amp;quot;).text = node.selectSingleNode(&amp;quot;Diameter&amp;quot;).text; as you are setting that after you check for and remove the nil attribute. However, to test to see if a node is null,&amp;nbsp; I believe you can use null == node with node being the variable you want to test (sorry, not really a javascript girl, so I&amp;#39;m guessing on that one).&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Copy/Clone data from DBXL Secondary Data Connection to InfoPath 2003 Repeating table in Main Data in JS</title><link>https://www.infopathdev.com:443/forums/thread/44244.aspx</link><pubDate>Mon, 13 Jul 2009 21:05:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44244</guid><dc:creator>kennebg</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44244.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=61&amp;PostID=44244</wfw:commentRss><description>&lt;p&gt;Good grief Charlie Brown.&amp;nbsp; One step at a time!&lt;/p&gt;
&lt;p&gt;So with a little work I got the nil attribute to work. &lt;/p&gt;
&lt;p&gt;Now I have encountered a situation where there i a record but it has no Diameter input in it as of yet.&amp;nbsp; This could happen.&amp;nbsp; I have tried to test it comparing for null and undefined but neither seems to work.&amp;nbsp; I may be testing against the wrong thing. &lt;/p&gt;
&lt;p&gt;I&amp;#39;ve spent the better part of the afternoon trying to find the answer myself.&amp;nbsp; Basically the record has been created but that field is yet to be populated at all. It errors out with object required error when it tried to appendchild. I&amp;#39;m asuming that since it was not populated it just doesn&amp;#39;t exists in the XML yet?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Here is the current code minus my attempts to test for null or undefined.&amp;nbsp; This works fine as long as there is a value in the Diameter field.&lt;/p&gt;
&lt;p&gt;function CTRL188_5::OnClick(eventObj)&lt;br /&gt;{&lt;br /&gt;// Get a copy of the main DOM node. &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var clone = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:group3/my:Test_Details&amp;quot;).cloneNode(true); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Copy nodes from 2DS to main DOM. &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var nodes = XDocument.GetDOM(&amp;quot;GetListItemsStr&amp;quot;).selectNodes(&amp;quot;/dfs:myFields/dfs:dataFields/ns1:GetListItemsStrResponse/ns1:GetListItemsStrResult/Rows/row&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var node;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(node = nodes.nextNode()) &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var newTestDetails = clone.cloneNode(true);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newTestDetails.selectSingleNode(&amp;quot;my:field10&amp;quot;).text = node.selectSingleNode(&amp;quot;Test_Serial_Number&amp;quot;).text;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; newTestDetails.selectSingleNode(&amp;quot;my:field11&amp;quot;).text = node.selectSingleNode(&amp;quot;Diameter&amp;quot;).text;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var field11 = newTestDetails.selectSingleNode(&amp;quot;my:field11&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var diameter = node.selectSingleNode(&amp;quot;Diameter&amp;quot;).text;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (diameter != &amp;quot;&amp;quot; &amp;amp; field11.getAttribute(&amp;quot;xsi:nil&amp;quot;));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;field11.removeAttribute(&amp;quot;xsi:nil&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;field11.text = diameter;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:group3&amp;quot;).appendChild(newTestDetails); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;// Write your code here&lt;br /&gt;}&lt;/p&gt;</description></item><item><title>Re: Copy/Clone data from DBXL Secondary Data Connection to InfoPath 2003 Repeating table in Main Data in JS</title><link>https://www.infopathdev.com:443/forums/thread/44229.aspx</link><pubDate>Mon, 13 Jul 2009 18:59:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44229</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44229.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=61&amp;PostID=44229</wfw:commentRss><description>&lt;p&gt;For fields other than text, the xsi:nil attribute may be on the node -- for example, if you have a main data source element that is of a type decimal and it is NOT marked &amp;#39;Cannot be blank&amp;#39;, the xsi:nil attribute will be present. You&amp;#39;ll need to remove it. Try looking at the script on some of the sample forms installed with InfoPath for examples. The Asset Tracker sample uses this to remove xsi:nil:&lt;/p&gt;
&lt;blockquote&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;// The xsi:nil needs to be removed before we set the value.&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;if&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; (value != &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &amp;amp;&amp;amp; xmlNode.getAttribute(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;xsi:nil&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;))&lt;br /&gt;xmlNode.removeAttribute(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;xsi:nil&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;So, for your code, maybe something like...&lt;/p&gt;
&lt;blockquote&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;var&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; field11 = newTestDetails.selectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;my:field11&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;var&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; diameter = node.selectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;Diameter&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;).text;&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;if&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; (diameter != &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &amp;amp; field11.getAttribute(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;xsi:nil&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;));&lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;xmlNode.removeAttribute(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;xsi:nil&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;field11.text = diameter; &lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I didn&amp;#39;t test this, so there is every chance in the world I might have a typo, but hopefully that will give you the idea...&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: Copy/Clone data from DBXL Secondary Data Connection to InfoPath 2003 Repeating table in Main Data in JS</title><link>https://www.infopathdev.com:443/forums/thread/44226.aspx</link><pubDate>Mon, 13 Jul 2009 18:46:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44226</guid><dc:creator>kennebg</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44226.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=61&amp;PostID=44226</wfw:commentRss><description>&lt;p&gt;OK.&amp;nbsp; That worked for the first field, field 10.&amp;nbsp; So now I tried to proceed cautiously by expanding to one for more field and it&amp;#39;s blowing up with this error:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;#39;#PCDATA&amp;#39; is in nil content: &amp;lt;{http://schemas.microsoft.com/office/infopath/2003/myXSD/2009-04-28T14:41:50}field11&amp;gt;.&lt;/p&gt;
&lt;p&gt;File:script.js&lt;br /&gt;Line:143&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the current code:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;function CTRL188_5::OnClick(eventObj)&lt;br /&gt;{&lt;br /&gt;// Get a copy of the main DOM node. &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var clone = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:group3/my:Test_Details&amp;quot;).cloneNode(true); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Copy nodes from 2DS to main DOM. &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var nodes = XDocument.GetDOM(&amp;quot;GetListItemsStr&amp;quot;).selectNodes(&amp;quot;/dfs:myFields/dfs:dataFields/ns1:GetListItemsStrResponse/ns1:GetListItemsStrResult/Rows/row&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var node;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(node = nodes.nextNode()) &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var newTestDetails = clone.cloneNode(true);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newTestDetails.selectSingleNode(&amp;quot;my:field10&amp;quot;).text = node.selectSingleNode(&amp;quot;Test_Serial_Number&amp;quot;).text;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newTestDetails.selectSingleNode(&amp;quot;my:field11&amp;quot;).text = node.selectSingleNode(&amp;quot;Diameter&amp;quot;).text;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:group3&amp;quot;).appendChild(newTestDetails); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;// Write your code here&lt;br /&gt;}&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;What fun. The only difference I see is that in the table it is a Double Decimal field instead of a text field.&amp;nbsp; It is stored in SharePoint as a Double Decimal but I notice when I look in the DBXL secondary data source that it shows it as a&amp;nbsp;string.&amp;nbsp; Do I need to change something in my DBXL query or do I have to perform some type of conversion on it from a string back to a number before trying to insert it?&lt;/p&gt;
&lt;p&gt;The error is occuring right at the appendChild command of the script. Not the line just above it where it gets set?&lt;/p&gt;
&lt;p&gt;I know I&amp;#39;m asking you lots of basic JS here but I&amp;#39;m in a bind.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>