<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Insert new field and populate automatically - without code?</title><link>https://www.infopathdev.com:443/forums/thread/31670.aspx</link><pubDate>Mon, 25 Aug 2008 07:28:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31670</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31670.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=31670</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Here is the code you have to write in your onLaod function,&lt;/p&gt;
&lt;p&gt;IXMLDOMDocument2 sampleDataDom = (IXMLDOMDocument2)thisXDocument.CreateDOM();&lt;/p&gt;
&lt;p&gt;sampleDataDom.async = false;&lt;/p&gt;
&lt;p&gt;sampleDataDom.validateOnParse = false;&lt;/p&gt;
&lt;p&gt;sampleDataDom.setProperty(&amp;quot;SelectionNamespaces&amp;quot;, &amp;quot;namespace of your form&amp;quot;);&lt;/p&gt;
&lt;p&gt;sampleDataDom.load(&amp;quot;sampledata.xml&amp;quot;);&lt;/p&gt;
&lt;p&gt;IXMLDOMNode nodeFromSampledata = sampleDataDom.selectSingleNode(&amp;quot;XPath of repeating field node&amp;quot;).cloneNode(true);&lt;/p&gt;
&lt;p&gt;//Setting the update by field value&lt;/p&gt;
&lt;p&gt;nodeFromSampledata.text = &amp;quot;Update by value&amp;quot;;&lt;/p&gt;
&lt;p&gt;IXMLDOMNode parentNode = thisXDocument.DOM.selectSingleNode(&amp;quot;Parent node path&amp;quot;);&lt;/p&gt;
&lt;p&gt;//Inserting the sample node at first position.&lt;/p&gt;
&lt;p&gt;parentNode.parentNode.insertBefore(nodeFromSampledata, parentNode);&lt;/p&gt;</description></item><item><title>Re: Insert new field and populate automatically - without code?</title><link>https://www.infopathdev.com:443/forums/thread/31374.aspx</link><pubDate>Tue, 12 Aug 2008 15:53:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31374</guid><dc:creator>Catharine</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31374.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=31374</wfw:commentRss><description>&lt;p&gt;Thank you for the reply.&lt;/p&gt;
&lt;p&gt;My coding is very limited.&amp;nbsp; Do you know of any example of the process described that I could use as my starting point ?&lt;/p&gt;
&lt;p&gt;Catharing&lt;/p&gt;</description></item><item><title>Re: Insert new field and populate automatically - without code?</title><link>https://www.infopathdev.com:443/forums/thread/31367.aspx</link><pubDate>Tue, 12 Aug 2008 15:06:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31367</guid><dc:creator>chandrakanth</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31367.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=31367</wfw:commentRss><description>&lt;span style="FONT-SIZE:10pt;LINE-HEIGHT:115%;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;Hi Catharine,&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;LINE-HEIGHT:115%;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;Sorry to say that you can&amp;#39;t add the record by using the rules, you can add the &amp;quot;Updatedby&amp;quot; record only by using the code. &lt;/span&gt;&lt;span style="FONT-SIZE:10pt;LINE-HEIGHT:115%;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;The steps that you need to follow for writing the code are:&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;LINE-HEIGHT:115%;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana;"&gt;&lt;span style="mso-list:Ignore;"&gt;1.&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;LINE-HEIGHT:115%;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;Get the username who has opened the form.&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;LINE-HEIGHT:115%;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana;"&gt;&lt;span style="mso-list:Ignore;"&gt;2.&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;LINE-HEIGHT:115%;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;After getting the user name, get the “Updatedby” record from the “SampleData.xml” and assign the user name to this “Updatedby” record.&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;LINE-HEIGHT:115%;mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;"&gt;&lt;span style="mso-list:Ignore;"&gt;3.&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;LINE-HEIGHT:115%;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;Add the above “Updatedby” record as child, to the parent node of the “Updatedby” record in “template.xml”.&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;LINE-HEIGHT:115%;"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;LINE-HEIGHT:115%;"&gt;&amp;nbsp;&lt;/span&gt; 
&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;span style="FONT-SIZE:10pt;LINE-HEIGHT:115%;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;Execute the above steps whenever the user opened the form .By following the above steps you can save history who has updated the InfoPath form.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Insert new field and populate automatically - without code?</title><link>https://www.infopathdev.com:443/forums/thread/31345.aspx</link><pubDate>Mon, 11 Aug 2008 17:25:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31345</guid><dc:creator>Catharine</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31345.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=31345</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I want to keep a history of who has&amp;nbsp;updated&amp;nbsp;my InfoPathForms.&amp;nbsp; This will be visible to developers in a separate View I have created a Group with repeating field(Updatedby) to store the information.&lt;/p&gt;
&lt;p&gt;When I open the form I can determine who is opening the form.&amp;nbsp; How do I create a new Updatedby record&amp;nbsp;and populate it with this information - preferably using Rules rather than code.&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;
&lt;p&gt;Catharine&lt;/p&gt;</description></item></channel></rss>