<?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: Getting the file name with code</title><link>https://www.infopathdev.com:443/forums/thread/26963.aspx</link><pubDate>Tue, 04 Mar 2008 00:21:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26963</guid><dc:creator>Clay Fox</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26963.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=26963</wfw:commentRss><description>&lt;p&gt;I think there is a way with code.&lt;/p&gt;
&lt;p&gt;However what I do ussually is just store the form name in the form itself. Or in your case might store and save both form names if they differ.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;So instead fo having some concat function as form name. I would put that into the default of a field in the form itself.&lt;/p&gt;
&lt;p&gt;For the dataconnection I would reference this field instead and when it came time to delete you have this form name for the delete.&lt;/p&gt;</description></item><item><title>Getting the file name with code</title><link>https://www.infopathdev.com:443/forums/thread/26950.aspx</link><pubDate>Mon, 03 Mar 2008 21:46:41 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26950</guid><dc:creator>KoopLaFez</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26950.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=26950</wfw:commentRss><description>&lt;p&gt;Is it possible to get the file name of an XML form using code?&amp;nbsp; Here is what I&amp;#39;m trying to do:&lt;br /&gt;&lt;br /&gt;I have one SharePoint form library that contains the form template.&amp;nbsp; When the user submits a new form using this template, it submits the form to a different form library (Library A).&amp;nbsp; Another user than opens the form from Library A, validates the data, adds her digital signature, then submits the form to a thrid form library (Library B).&amp;nbsp; What I would like to happen&amp;nbsp;is that when the user submits the from from Library A to Library B, the original form in Library A is deleted, so that it would essentially like moving a file between directories in Windows.&lt;/p&gt;
&lt;p&gt;I found instructions on how to delete a file from a SharePoint form library&amp;nbsp;&lt;a class="" href="http://www.infopathdev.com/blogs/agni/archive/2006/03/12/Delete-File-from-SharePoint.aspx" target="_blank"&gt;here&lt;/a&gt;, and used them to create a function that deletes a file based on a given path.&amp;nbsp; It worked fine, but the problem is that I either have to hard code the path or enter it manually via the form.&amp;nbsp; What I would like is some way to grab the file name of the form so that when the user opens the form from Library A and clicks submit, I can automatically pass the form&amp;#39;s full path to the delete funciton once it has been submitted to Library B.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I&amp;#39;ve been looking through the help file and MSDN but haven&amp;#39;t been able to find any property that contains the file name.&amp;nbsp; Any ideas?&lt;/p&gt;</description></item></channel></rss>