<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>JScript saving form information when user creates new record</title><link>https://www.infopathdev.com:443/forums/thread/40506.aspx</link><pubDate>Fri, 10 Apr 2009 12:29:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:40506</guid><dc:creator>Wheels</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/40506.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=40506</wfw:commentRss><description>&lt;p&gt;Good morning.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I have a user form with about 50 fields. The data connections are several databases and submit through Outlook.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;My problem is as follows:&lt;/p&gt;
&lt;p&gt;When a person submits a form, the information writes to the database, but if someone types over the fields, it writes over that record. I have to open a new form which clears out the fields and moves the record pointer to a new record position (similar to the New Record command button).&lt;/p&gt;
&lt;p&gt;There are situations where we need to reuse the (majority of the) information a user has entered, but when submitted it should be in a new record and not append the last record.&lt;/p&gt;
&lt;p&gt;What I am looking to do is as follows:&lt;/p&gt;
&lt;p&gt;When a user completes the form, and then clicks submit, a function is run to save the fields as global variables, the new record is initiated, the fields automatically get cleared out, and then another function is run to populate the fields with the old information.&lt;/p&gt;
&lt;p&gt;I have created a couple of functions in JScript Function StoreFields( ) and Function PopulateFields( ), but I can&amp;#39;t seem to find any code for New Record.&lt;/p&gt;
&lt;p&gt;Any assistance would be greatly appreciated.&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;WHEELS&lt;/p&gt;</description></item></channel></rss>