<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: JScript code to save fields as values</title><link>https://www.infopathdev.com:443/forums/thread/41084.aspx</link><pubDate>Wed, 29 Apr 2009 12:06:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:41084</guid><dc:creator>Wheels</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/41084.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=41084</wfw:commentRss><description>&lt;p&gt;Good morning everyone.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I was able to easily accomplish this in VBScript, but I am still having difficulties with JScript.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I have the following code:&lt;/p&gt;
&lt;p&gt;&lt;font face="Lucida Console" size="2"&gt; var Lockbox; &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Lucida Console" size="2"&gt; var Cash_Deposit_Date; &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Lucida Console" size="2"&gt; var Batch_Number; &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Lucida Console" size="2"&gt; function StoreFields() { &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Lucida Console" size="2"&gt; Lockbox = XDocument.DOM.selectSingleNode(&amp;quot;dfs:myFields/dfs:dataFields/d:tbl_GC100/@Lockbox&amp;quot;).Text; &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Lucida Console" size="2"&gt; Cash_Deposit_Date = XDocument.DOM.selectSingleNode(&amp;quot;dfs:myFields/dfs:dataFields/d:tbl_GC100/@Cash_Deposit_Date&amp;quot;).Text; &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Lucida Console" size="2"&gt; Batch_Number = XDocument.DOM.selectSingleNode(&amp;quot;dfs:myFields/dfs:dataFields/d:tbl_GC100/@Batch_Number&amp;quot;).Text; } &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I know the field (node) references are correct. My theory is there is something arwy with how JScript handles global vaiables.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Any ideas? Thank you. WHEELS&lt;/p&gt;</description></item><item><title>JScript code to save fields as values</title><link>https://www.infopathdev.com:443/forums/thread/40052.aspx</link><pubDate>Thu, 26 Mar 2009 19:44:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:40052</guid><dc:creator>Wheels</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/40052.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=40052</wfw:commentRss><description>&lt;p&gt;Good afternoon.&lt;/p&gt;
&lt;p&gt;I am new to InfoPath 2003 and this is what I am trying to accomplish:&lt;/p&gt;
&lt;p&gt;When a user complete the form, it is sent as an email attachment to several locations. It also submits the data to the main connection DB.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;When a new record is created, the fields in the form are blanked out. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;I want to save the fields as public variables and then when the new form appears populate the fields with the old information.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I don&amp;#39;t know any JScript. Any suggestions?&lt;/p&gt;
&lt;p&gt;Thank you, WHEELS&lt;/p&gt;</description></item></channel></rss>