<?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>Re: Run a code only once to add the data from the secondary data source to main data source</title><link>https://www.infopathdev.com:443/forums/thread/46094.aspx</link><pubDate>Thu, 20 Aug 2009 15:22:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:46094</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/46094.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=46094</wfw:commentRss><description>&lt;p&gt;Hi:&lt;/p&gt;
&lt;p&gt;You can find out if a form is new by using the following:&lt;/p&gt;
&lt;p&gt;C#, IP 2003:&lt;/p&gt;
&lt;blockquote&gt;&lt;font size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;bool&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; newForm = thisXDocument.IsNew;&lt;/p&gt;&lt;/font&gt;&lt;/blockquote&gt;
&lt;p&gt;C#, IP 2007:&lt;/p&gt;
&lt;blockquote&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;bool&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; newForm = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.New;&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;font size="2"&gt;The newForm variable will be true if the form is new, false if it isn&amp;#39;t. Of course, if the &amp;#39;newness&amp;#39; of the form isn&amp;#39;t the deciding factor as to whether to run your code, you may need to have a field in your form that you use to help you decide the right time to run your code...&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;</description></item><item><title>Re: Run a code only once to add the data from the secondary data source to main data source</title><link>https://www.infopathdev.com:443/forums/thread/46083.aspx</link><pubDate>Thu, 20 Aug 2009 11:34:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:46083</guid><dc:creator>StatReq</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/46083.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=46083</wfw:commentRss><description>&lt;p&gt;Hi, this sounds like the exact same problem I&amp;#39;m having. Could you (or anybody else) elaborate on how&amp;nbsp;you solved it?&lt;/p&gt;</description></item><item><title>Re: Run a code only once to add the data from the secondary data source to main data source</title><link>https://www.infopathdev.com:443/forums/thread/40725.aspx</link><pubDate>Sun, 19 Apr 2009 12:52:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:40725</guid><dc:creator>deepak483</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/40725.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=40725</wfw:commentRss><description>&lt;p&gt;Oops Didnt see the form instance new options...&lt;/p&gt;&lt;p&gt;I used the code to check if the form is a new or not...&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Run a code only once to add the data from the secondary data source to main data source</title><link>https://www.infopathdev.com:443/forums/thread/40723.aspx</link><pubDate>Sun, 19 Apr 2009 10:41:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:40723</guid><dc:creator>deepak483</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/40723.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=40723</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hello All, &lt;br /&gt;&lt;/p&gt;&lt;p&gt;This forum has been indispensable in learning infopath. I am trying to submit form to a SharePoint library which has a fields which has data coming from sharepoint list ( I am using repeating section to get those data) and check box next to it if the service is available in the chosen branch or not.&lt;/p&gt;&lt;p&gt;The problem I am facing is that I wrote the code at onload event to copy the main data source to the secondary data source and dispaly it in the repeating section is every time the form is opened to edit a new section is added at the end with a new copy of the list items from the list library. How can I avoid that.&lt;/p&gt;&lt;p&gt;&amp;nbsp;Also I want to have the same contents as there in the list library i.e. I want the repeating section to be in sync witht the list items any changes in the list library should be updated in the form...&lt;/p&gt;&lt;p&gt;&amp;nbsp;Any hints in regards this will be of real help...thanks in advance. &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>