<?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: SAVE form using button control</title><link>https://www.infopathdev.com:443/forums/thread/90077.aspx</link><pubDate>Thu, 23 May 2013 16:04:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:90077</guid><dc:creator>Ace07</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/90077.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=90077</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Can you explain how you got it to work?&lt;/p&gt;&lt;p&gt;Thank you&lt;/p&gt;</description></item><item><title>Re: SAVE form using button control</title><link>https://www.infopathdev.com:443/forums/thread/76609.aspx</link><pubDate>Tue, 20 Mar 2012 09:50:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:76609</guid><dc:creator>dkanha</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/76609.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=76609</wfw:commentRss><description>Can you show the full code for save button
I tryed with 
- Xdocument.save ()
But i need something more??</description></item><item><title>Re: SAVE form using button control</title><link>https://www.infopathdev.com:443/forums/thread/61463.aspx</link><pubDate>Tue, 16 Nov 2010 19:53:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61463</guid><dc:creator>Daren_D</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61463.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=61463</wfw:commentRss><description>&lt;p&gt;I just wanted to say &amp;quot;Thanks&amp;quot; this was a great, easy piece of code to implement.&amp;nbsp; Works great!!&lt;/p&gt;</description></item><item><title>Re: SAVE form using button control</title><link>https://www.infopathdev.com:443/forums/thread/36267.aspx</link><pubDate>Wed, 24 Dec 2008 23:15:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36267</guid><dc:creator>Skarn</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36267.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36267</wfw:commentRss><description>&lt;p&gt;Merry christmas!&lt;/p&gt;
&lt;p&gt;Does the New ActiveXObject command work for you in code or does it force you to level 3 security? (which is fine I guess if you can do that as well).&lt;/p&gt;
&lt;p&gt;Try the following function&lt;br /&gt;[jScript]&lt;/p&gt;
&lt;p&gt;function saveFormAsFile()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;var strFileName = &amp;quot;formName.xml&amp;quot;&lt;br /&gt;&amp;nbsp;var xmlDoc = XDocument.DOM.xml;&lt;br /&gt;&amp;nbsp;var objFSO = new ActiveXObject(&amp;quot;Scripting.FileSystemObject&amp;quot;);&lt;br /&gt;&amp;nbsp;var tempFile = objFSO.CreateTextFile(&amp;quot;c:\\&amp;quot; + strFileName , true);&lt;br /&gt;&amp;nbsp;tempFile.Write(xmlDoc);&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;If your form lets you use the ActiveXObject command then this should work for you. But maybe also other security issues in your workplace which stop it. But try!&lt;/p&gt;
&lt;p&gt;Obviously replace strFileName with your own form name to save as, even try building it using values from your XML nodes (if you can do this, maybe can help). Also c:\ will need to be replaced with the network path - I have only ever used local drive paths - maybe network paths won&amp;#39;t work O_O.&lt;/p&gt;
&lt;p&gt;good luck!&lt;/p&gt;</description></item><item><title>Re: SAVE form using button control</title><link>https://www.infopathdev.com:443/forums/thread/36262.aspx</link><pubDate>Wed, 24 Dec 2008 16:35:41 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36262</guid><dc:creator>warrtalon</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36262.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36262</wfw:commentRss><description>&lt;p&gt;Right.&amp;nbsp; What I&amp;#39;ve prescribed would do the trick for you, but instead of two separate buttons, you could put all the rules behind one custom submit button (no code).&amp;nbsp; The actions in the rule would be like this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;Set a field&amp;#39;s value.&amp;nbsp; Field = Filename (text data element); Value = concat(fields1,fields)&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Submit using a data connection (submit&amp;#39;s to location)&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Submit using a data connection (submit to Access DB)&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Close&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Unfortunately, I don&amp;#39;t see a way to tell it to publish to a network drive.&amp;nbsp; If you had SharePoint, this would work great and be very easy, but without SharePoint or another ASP.net hosting app, I don&amp;#39;t suppose you can do it with the GUI.&amp;nbsp; If you can get the Save function from above to work within your custom button to replace step 2 above, then I think you&amp;#39;d be golden.&lt;/p&gt;</description></item><item><title>Re: SAVE form using button control</title><link>https://www.infopathdev.com:443/forums/thread/36260.aspx</link><pubDate>Wed, 24 Dec 2008 16:01:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36260</guid><dc:creator>dkenne</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36260.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36260</wfw:commentRss><description>&lt;p&gt;Currently, users are submitting the data directly to an access database sitting in a folder on a network drive. Users are also being instructed to save the form to a folder on the network (as a backup incase the database were to crash or corrupt). Users are saving the form simply by clicking &amp;quot;Save&amp;quot; on the toolbar menu and typing in a file name.&lt;/p&gt;
&lt;p&gt;I was hoping to include a button that would simultaneously submit the data and save the form to a folder using a file name that is generated from data in the form (e.g., LastName + ID#). Having this functionality is not critical in order to use the form, but (unfortunately) users do not always do as they are asked, and I am afraid that some users will fail to save the form. Conseuqently, if the database were to ever corrupt, we would lose important information. With each form saved, I could rebuild the database easily should the need arise. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks.&lt;/p&gt;</description></item><item><title>Re: SAVE form using button control</title><link>https://www.infopathdev.com:443/forums/thread/36259.aspx</link><pubDate>Wed, 24 Dec 2008 15:46:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36259</guid><dc:creator>warrtalon</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36259.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36259</wfw:commentRss><description>&lt;p&gt;Hmm, well I know you can publish to a network path, so I figured you could submit to one.&amp;nbsp; What do people do who have it published to a network path and don&amp;#39;t have a back-end database nor SharePoint to submit the form to?&amp;nbsp; I only ever use InfoPath as a direct integration with SharePoint, so I&amp;#39;m not sure which step is involved to have the forms saved directly to a shared directory or whatever.&amp;nbsp; Are you currently not saving the form itself anywhere and are just submitting the data straight to Access?&amp;nbsp; I thought you were already submitting the resulting XML form itself to some location, but it now sounds like you&amp;#39;re only pushing the data to Access, and there is no leftover InfoPath file anywhere.&amp;nbsp; Then, I suppose that is why you want to be able to save it to a network drive.&amp;nbsp; Try the &amp;quot;XML Document&amp;quot; option of the Submit path above, because the resulting form after &amp;quot;submitting&amp;quot; an InfoPath form is truly an XML form (the template is an XSN).&lt;/p&gt;</description></item><item><title>Re: SAVE form using button control</title><link>https://www.infopathdev.com:443/forums/thread/36253.aspx</link><pubDate>Wed, 24 Dec 2008 14:36:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36253</guid><dc:creator>dkenne</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36253.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36253</wfw:commentRss><description>&lt;p&gt;So, if I understand you correctly, I need to have a data connection to a network path where I want to save the forms. Currently, I only have one data connection and it submits my data to the access database on the network drive. To create the second data connection, do I choose &amp;quot;Submit&amp;quot; or &amp;quot;Receive&amp;quot; data? Depedning on my choice, do I then select &amp;quot;Web Service&amp;quot; &amp;quot;Sharepoint Form Library&amp;quot; &amp;quot;XML Document&amp;quot; or &amp;quot;Database&amp;quot;? Those are my choices as I run through the &amp;quot;Data Connection Wizard.&amp;quot; I don&amp;#39;t have an option to select or browse to a network folder or select a path.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;</description></item><item><title>Re: SAVE form using button control</title><link>https://www.infopathdev.com:443/forums/thread/36231.aspx</link><pubDate>Wed, 24 Dec 2008 05:48:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36231</guid><dc:creator>warrtalon</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36231.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36231</wfw:commentRss><description>&lt;p&gt;No, the first rule is the submit for a form that has already been submitted once.&amp;nbsp; You need to make sure it uses the same exact filename from the original submit, and it can only run that rule when the form has been submitted at least once, which is only possible when the filename field is NOT blank.&amp;nbsp; That&amp;#39;s the point of setting the filename in the 2nd rule, because that&amp;#39;s when you are actually submitting the form for the first time to the SharePoint library.&amp;nbsp; The&amp;nbsp;first time you&amp;nbsp;submit the form, it skips the first rule and runs the second rule, which first sets the filename field (hidden field) and then submits to the library using that pre-set filename.&amp;nbsp; The next time that form is opened, the filename is already set, so&amp;nbsp;ONLY rule 1 runs, and all that does is overwrite the existing file with the new data (same filename).&amp;nbsp; I don&amp;#39;t like to&amp;nbsp;set the filename to a default&amp;nbsp;value, because the fields being used to set the filename may change, which then screws up the whole system.&amp;nbsp; Set the filename once when it is first submitted and never&amp;nbsp;touch it again.&lt;/p&gt;</description></item><item><title>Re: SAVE form using button control</title><link>https://www.infopathdev.com:443/forums/thread/36229.aspx</link><pubDate>Wed, 24 Dec 2008 04:33:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36229</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36229.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36229</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;In above rules should be order like first is setting file name and then submitting data connection.&lt;/p&gt;
&lt;p&gt;Otherwise you can directly add the default value(combination of two fields data) for field name field.&lt;/p&gt;</description></item><item><title>Re: SAVE form using button control</title><link>https://www.infopathdev.com:443/forums/thread/36219.aspx</link><pubDate>Tue, 23 Dec 2008 20:17:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36219</guid><dc:creator>warrtalon</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36219.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36219</wfw:commentRss><description>&lt;p&gt;You don&amp;#39;t change the button settings.&amp;nbsp; You just change the label from &amp;quot;button&amp;quot; to &amp;quot;save&amp;quot; and then add rules by clicking the rules button.&amp;nbsp; Don&amp;#39;t change it to a submit-type button.&amp;nbsp; This is where you put the rules to create the filename and do the submitting to data connections.&lt;/p&gt;</description></item><item><title>Re: SAVE form using button control</title><link>https://www.infopathdev.com:443/forums/thread/36218.aspx</link><pubDate>Tue, 23 Dec 2008 20:03:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36218</guid><dc:creator>dkenne</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36218.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36218</wfw:commentRss><description>&lt;p&gt;I appreciate the instructions. I am trying to follow your steps as written, but I&amp;#39;m still not getting it to work. Either I am misunderstanding your instructions, or they are written out of order and thus causing issues for me. I have created the &amp;quot;Filename&amp;quot; field and put in the rules, but I don&amp;#39;t think I&amp;#39;ve got the rules in the correct place. Once I insert the button and then double-click to get the &amp;quot;Button Properties&amp;quot; window, what &amp;quot;action&amp;quot; do I select--&amp;quot;submit&amp;quot;? If so, then what do I select in the &amp;quot;Submit to&amp;quot; field of the next window that opens--&amp;quot;custom using rules&amp;quot;?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;</description></item><item><title>Re: SAVE form using button control</title><link>https://www.infopathdev.com:443/forums/thread/36215.aspx</link><pubDate>Tue, 23 Dec 2008 18:25:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36215</guid><dc:creator>warrtalon</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36215.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36215</wfw:commentRss><description>&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;Make a second &amp;quot;save&amp;quot; button next to your &amp;quot;submit&amp;quot; button on the form (not the built-in save/submit buttons on the toolbar, but rather custom buttons on the form).&amp;nbsp;The Save button will just be a plain button that you rename and that has rules behind it.&amp;nbsp; &lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Behind the Save button, add rules (no code)&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Create a new text data element in your main data source named Filename or whatever you prefer.&amp;nbsp; This is where you will store the concatenated &amp;quot;filename&amp;quot; that you want to use.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Create a rule with the condition that it will only trigger if Filename is NOT blank&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;The only action will be to &amp;quot;submit to a data connection,&amp;quot; and that data connection will either be a new or existing data connection to a network path where you want to save the forms.&amp;nbsp; That data connection should use the Filename field when naming the file before submission (this is in the last step of the data connection configuration wizard), and it should be set to OVERWRITE IF FILENAME ALREADY EXISTS.&amp;nbsp; This is the only action in this rule.&amp;nbsp; Since it&amp;#39;s not a browser form, you could also add a pop-up box that notifies the user of a successful &amp;quot;save.&amp;quot;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Create a second rule with the condition that it will only trigger if Filename IS blank (should also work if you have no condition, since we put the other rule first)&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;The first action of the second&amp;nbsp;rule will be to set the filname.&amp;nbsp; The&amp;nbsp;action will &amp;quot;set value in field&amp;quot; for the filename element and will insert the function &amp;quot;concat(field1,field2).&amp;quot;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;The second action will use your network path data connection to submit the file to a network drive using the data connection from step 5.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Change your current submit button so that it also uses this same Filename field to specify its filename upon final submission.&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Doing this, people can Save at any point in time without delay or hassle.&amp;nbsp; This shouldn&amp;#39;t require full trust or managed code.&lt;/p&gt;</description></item><item><title>Re: SAVE form using button control</title><link>https://www.infopathdev.com:443/forums/thread/36195.aspx</link><pubDate>Tue, 23 Dec 2008 12:45:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36195</guid><dc:creator>dkenne</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36195.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36195</wfw:commentRss><description>&lt;p&gt;OK. That worked, but I can&amp;#39;t register the form on other computers or digitally sign the form. So, is there a way to have the form specify a file name based on two fields when the user clicks on the &amp;quot;Save&amp;quot; icon on the Infopath menu?&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;</description></item><item><title>Re: SAVE form using button control</title><link>https://www.infopathdev.com:443/forums/thread/36182.aspx</link><pubDate>Tue, 23 Dec 2008 10:08:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36182</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36182.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36182</wfw:commentRss><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;The following steps will walk you through to solve your problem&lt;br /&gt;&lt;br /&gt;1. Open form in design mode&lt;br /&gt;2. Go to Properties window of button&lt;br /&gt;3. Click on &amp;#39;Edit Form code&amp;#39; button&lt;br /&gt;4. Write the following code in &amp;#39;OnClick function&amp;#39;&lt;br /&gt;&lt;br /&gt;Xdocument.Save();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And the form must be full trust, not just from the same domain. &lt;br /&gt;Marking the form as coming from a Trusted Site is not sufficient. &lt;br /&gt;&lt;br /&gt;You can make the form fully trusted by: &lt;br /&gt;A) Registering it on each user&amp;#39;s computer using an msi, or jscript file. &lt;br /&gt;B) Digitally signing the form (SP1 only) &lt;/p&gt;</description></item></channel></rss>