<?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>How can i get the form name into a field of the form?</title><link>https://www.infopathdev.com:443/forums/thread/39445.aspx</link><pubDate>Thu, 12 Mar 2009 10:30:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:39445</guid><dc:creator>Ajrob</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/39445.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=39445</wfw:commentRss><description>&lt;p&gt;First of all hello to everybody, I am new at InfoPath (the version I am actually working is 2007 with C# 2007 OM)&amp;nbsp; &lt;br /&gt;&lt;/p&gt;&lt;p&gt;I am working with infopath with web browser complatiblity and i am trying to do the next thing: when the form is new I assign the name getting the date, but when the form is not new and the user is editting it when he submit the form must keep his name. As i am working with custom save buttons the DataConnection used to send the form requires the name of the form, and I don´t know how can i get it.&lt;/p&gt;&lt;p&gt;The logic I have developed is below: &lt;br /&gt;&lt;/p&gt;&lt;p&gt;When the form is new, I save/upload it to a MOSS through a custom save button and this button assign the name with the Date/hour that is stored in a form field name dtNow with the function now().&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //submit the form using the data connection&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DataConnections[&amp;quot;Envío de Aceptación&amp;quot;].Execute();&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //set e.CancalableArgs to be false once form has successfully saved&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.CancelableArgs.Cancel = false;&amp;nbsp; &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;When the form is edited, I would like to save without putting it another name, so I thought that I could capture the name into a form field and use another DataConnection in the managed code.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thank you in advance. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>