<?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: Infopath 2003 - Submit to DB, Create New, Carry over specified values.</title><link>https://www.infopathdev.com:443/forums/thread/25888.aspx</link><pubDate>Thu, 24 Jan 2008 10:16:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25888</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25888.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=25888</wfw:commentRss><description>&lt;p&gt;Hi Luke and thanks for the solution.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m pretty sure there is a way to set it so that you can fool the DOM into thinking it is new without clearing all of the data elements. &lt;/p&gt;
&lt;p&gt;Another approach is to just remove the xdado element from the DOM.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s an exercise: create a sample form that queries and submits to a DB table. Previewed and enter some values, click submit. File-Save this form to c:\temp and call it &amp;quot;form1.xml&amp;quot;. Next, click New Record and save the XML to your c:\temp folder as &amp;quot;form2.xml&amp;quot;. Run windiff on these two files and notice that the difference is the &amp;lt;xdado...&amp;gt; element at the bottom of the xml.&lt;/p&gt;
&lt;p&gt;So, all you need to do is add a button that removes that element from your form and the rest of the data will not be affected. I&amp;#39;ll leave the removal of that node (simple xpath) as an exercise for you... :)&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;
&lt;p&gt;Related post: &lt;a href="http://www.infopathdev.com/forums/p/7091/25890.aspx#25890"&gt;http://www.infopathdev.com/forums/p/7091/25890.aspx#25890&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Re: Infopath 2003 - Submit to DB, Create New, Carry over specified values.</title><link>https://www.infopathdev.com:443/forums/thread/25880.aspx</link><pubDate>Thu, 24 Jan 2008 05:07:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25880</guid><dc:creator>luke.slotwinski</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25880.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=25880</wfw:commentRss><description>&lt;p&gt;I searched the web for hours trying to find a good solution to the problem.&amp;nbsp; This site had several people who ran into the exact same thing I was trying to do, however noone resolved it completely.&amp;nbsp; &lt;br /&gt;Problem is, the New Record Infopath functionality resets the DOM, allowing for a new DB submission.&amp;nbsp; I saw one person had a solution by assigning his fields into query fields, resetting the form, and brinign them back.&lt;br /&gt;What I ended up doing to&amp;nbsp;resolve this issue is declaring global&amp;nbsp;variables in&amp;nbsp;JScript; I&amp;nbsp;built a button triggered function which assigned the&amp;nbsp;form fields to those global variables, then submit the form, and switched a&amp;nbsp;temp view which only had a&amp;nbsp;success message and&amp;nbsp;a new record button.&amp;nbsp;&amp;nbsp;Click the New&amp;nbsp;Record button, resets the DOM and brings the user back to the default view of the form.&amp;nbsp; There I had another function button which&amp;nbsp;defined the form values with the&amp;nbsp;global variables.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;Hope this helps anyone in the future looking to&amp;nbsp;carry&amp;nbsp;values over to a new&amp;nbsp;form.&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Infopath 2003 - Submit to DB, Create New, Carry over specified values.</title><link>https://www.infopathdev.com:443/forums/thread/25770.aspx</link><pubDate>Mon, 21 Jan 2008 15:31:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25770</guid><dc:creator>Clay Fox</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25770.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=25770</wfw:commentRss><description>&lt;p&gt;After the submit it sounds like you would want to create a new record or row. then you would copy the data from the previous row to the new one to &amp;quot;seed&amp;quot; you values.&lt;/p&gt;
&lt;p&gt;It sounds like this is the step you are missing or you are not referencing the new row properly.&lt;/p&gt;
&lt;p&gt;I beleive there are some blog examples, here on the site, on how to use an exisitng row as a template and to copy a record as a new record.&lt;/p&gt;</description></item><item><title>Infopath 2003 - Submit to DB, Create New, Carry over specified values.</title><link>https://www.infopathdev.com:443/forums/thread/25758.aspx</link><pubDate>Sat, 19 Jan 2008 22:26:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25758</guid><dc:creator>luke.slotwinski</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25758.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=25758</wfw:commentRss><description>&lt;p&gt;Using Infopath 2003 and JScript&lt;/p&gt;
&lt;p&gt;I have built a form which submits to a MS Access DB.&amp;nbsp; &lt;br /&gt;I added two buttons: submit1 and submit2&lt;br /&gt;submit1 works properly, it submits to DB and clears form.&lt;br /&gt;submit2 i am trying to get to submit to DB and clear only specified fields leaving others as defined before submit2 was triggered.&amp;nbsp; I tried to use XDocument.Submit() and then manually setting each field to &amp;quot;&amp;quot; via DOM SelectSingleNode.&amp;nbsp; What happends is that submit2 clears the fields properly but then the next submit doesnt create a new row entry rather it updates the first entry.&amp;nbsp; &lt;br /&gt;Basically I&amp;#39;m seeking to submit to DB then carry over certain values to a new form.&amp;nbsp; Thanks in advance,&lt;br /&gt;Luke Slotwinski&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>