<?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: Using a field from the form to save as the filename.</title><link>https://www.infopathdev.com:443/forums/thread/24883.aspx</link><pubDate>Tue, 04 Dec 2007 11:10:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:24883</guid><dc:creator>PJagger</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/24883.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=24883</wfw:commentRss><description>&lt;p&gt;Thank you&lt;/p&gt;</description></item><item><title>Re: Using a field from the form to save as the filename.</title><link>https://www.infopathdev.com:443/forums/thread/24691.aspx</link><pubDate>Mon, 26 Nov 2007 16:26:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:24691</guid><dc:creator>Clay Fox</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/24691.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=24691</wfw:commentRss><description>&lt;p&gt;You can use the buttons in the formula window to contruct your formula, to insert formulas or fields.&lt;/p&gt;
&lt;p&gt;typically you would concat(namefield, &amp;quot;-&amp;quot;, datefield) etc or whatever worked for you.&lt;/p&gt;</description></item><item><title>Re: Using a field from the form to save as the filename.</title><link>https://www.infopathdev.com:443/forums/thread/24669.aspx</link><pubDate>Mon, 26 Nov 2007 02:52:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:24669</guid><dc:creator>djay</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/24669.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=24669</wfw:commentRss><description>&lt;p&gt;There is a function to set the default save file name without using submit and locking down saves:&lt;/p&gt;
&lt;p&gt;thisXDocument.UI.SetSaveAsDialogFileName(string bstrFileName)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;To use this in real life it would look something like this (c#):&lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;[InfoPathEventHandler(MatchPath=&amp;quot;/my:myFields/my:Field1&amp;quot;, EventType=InfoPathEventType.OnAfterChange)]&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;public&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;font size="2"&gt; Field1_OnAfterChange(DataDOMEvent e) {&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#0000ff" size="2"&gt; 
&lt;p&gt;if&lt;/font&gt;&lt;font size="2"&gt;(e.Operation == &amp;quot;Insert&amp;quot;) &lt;/font&gt;&lt;/font&gt;{&lt;/p&gt;
&lt;p&gt;string saveFile = thisXDocument.DOM.selectSingleNode(&amp;quot;my:myFields/my:Field1&amp;quot;).text;&lt;/p&gt;
&lt;p&gt;thisXDocument.UI.SetSaveAsDialogFileName(saveFile + &amp;quot;.xml&amp;quot;);&lt;/p&gt;
&lt;p&gt;}}&lt;/p&gt;
&lt;p&gt;&amp;nbsp;This code will autoupdate the save file name when Field1 changes.&amp;nbsp; And if you want Field1 to be a concatination of other fields you can set it&amp;#39;s default value to something like:&lt;/p&gt;
&lt;p&gt;concat(Field2,&amp;quot;-&amp;quot;,Field3)&lt;/p&gt;</description></item><item><title>Re: Using a field from the form to save as the filename.</title><link>https://www.infopathdev.com:443/forums/thread/24665.aspx</link><pubDate>Sun, 25 Nov 2007 16:54:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:24665</guid><dc:creator>PJagger</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/24665.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=24665</wfw:commentRss><description>&lt;p&gt;Thanks for your reply,&lt;/p&gt;
&lt;p&gt;I am familiar with the concat function in the rules option, but would you mind showing me typical script that would use the concat function within the code which includes a field within the form.&amp;nbsp; I am not wholly up with the &amp;quot;syntax&amp;quot; of addressing fields etc within the&amp;nbsp;code editor.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Regards - Phil&lt;/p&gt;</description></item><item><title>Re: Using a field from the form to save as the filename.</title><link>https://www.infopathdev.com:443/forums/thread/24604.aspx</link><pubDate>Wed, 21 Nov 2007 14:12:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:24604</guid><dc:creator>Clay Fox</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/24604.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=24604</wfw:commentRss><description>&lt;p&gt;Typical practice is to use a submit data connection.&amp;nbsp; The save and save as functionis, if you allow them, do not have any control over them and are for the user to create their own copy, which usually I do not allow any way.&lt;/p&gt;
&lt;p&gt;When you create a submit connection then you can set the location and the filenaming convention within it so the process is controlled and consistent.&amp;nbsp; Typically you would concatenate the filename using form data so that each one would save with a unique file name.&lt;/p&gt;</description></item><item><title>Using a field from the form to save as the filename.</title><link>https://www.infopathdev.com:443/forums/thread/24592.aspx</link><pubDate>Wed, 21 Nov 2007 08:03:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:24592</guid><dc:creator>PJagger</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/24592.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=24592</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have a simple task.&amp;nbsp; I have worked out how to use the SAVEAS function to save the file to a specific location on the file system.&amp;nbsp; I need to include a field from the form in the file name.&amp;nbsp; I am sure this is an easy one, but I have searched hard to find help but to no avail.&amp;nbsp; Thanks for your help.&lt;/p&gt;</description></item></channel></rss>