<?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>Views</title><link>https://www.infopathdev.com:443/forums/42.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Submits on different Views Create Multiple Form Instances/Closing InfoPath</title><link>https://www.infopathdev.com:443/forums/thread/35394.aspx</link><pubDate>Sat, 06 Dec 2008 06:20:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35394</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35394.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=35394</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Here is the code will work to close the Infopath2007 form.&lt;/p&gt;
&lt;p&gt;this.Application.ActiveWindow.Close();&lt;/p&gt;</description></item><item><title>Re: Submits on different Views Create Multiple Form Instances/Closing InfoPath</title><link>https://www.infopathdev.com:443/forums/thread/35390.aspx</link><pubDate>Sat, 06 Dec 2008 04:55:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35390</guid><dc:creator>swathip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35390.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=35390</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Use the following code line to close the infopath application.&lt;/p&gt;
&lt;p&gt;XDocument.View.Window.Close(true);&lt;/p&gt;</description></item><item><title>Re: Submits on different Views Create Multiple Form Instances/Closing InfoPath</title><link>https://www.infopathdev.com:443/forums/thread/35369.aspx</link><pubDate>Fri, 05 Dec 2008 13:49:41 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35369</guid><dc:creator>Steph</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35369.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=35369</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks, but &amp;#39;Close the Form&amp;#39; only closes the filled-out form; it does not close the InfoPath application.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Steph&lt;/p&gt;</description></item><item><title>Re: Submits on different Views Create Multiple Form Instances/Closing InfoPath</title><link>https://www.infopathdev.com:443/forums/thread/35339.aspx</link><pubDate>Fri, 05 Dec 2008 04:37:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35339</guid><dc:creator>swathip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35339.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=35339</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can submit the form and close the form by putting the rules on the submit button.&lt;/p&gt;
&lt;p&gt;1. Add a submit connection using sharepoint library.&lt;/p&gt;
&lt;p&gt;2. Place the value or field that should be shown as File name.&lt;/p&gt;
&lt;p&gt;3. Check the ‘Allow overwrite if file exists&amp;#39; check box.&lt;/p&gt;
&lt;p&gt;4. Go to button properties.&lt;/p&gt;
&lt;p&gt;5. Select ‘Submit&amp;#39; in Action drop down.&lt;/p&gt;
&lt;p&gt;6. Click on submit options button and choose the data connection which is taken above. &lt;/p&gt;
&lt;p&gt;7. Click Submit options button and select ‘Close the Form&amp;#39;. Click ok to close all the windows.&lt;/p&gt;
&lt;p&gt;8. Do the same for all the buttons.&lt;/p&gt;</description></item><item><title>Submits on different Views Create Multiple Form Instances/Closing InfoPath</title><link>https://www.infopathdev.com:443/forums/thread/35319.aspx</link><pubDate>Thu, 04 Dec 2008 20:50:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35319</guid><dc:creator>Steph</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35319.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=35319</wfw:commentRss><description>&lt;font size="2"&gt;
&lt;p&gt;Infopath 2003&lt;/p&gt;
&lt;p&gt;I have a form with multiple views (for different user roles), and each view has a submit button. The form is on SharePoint. &lt;/p&gt;
&lt;p&gt;I need the InfoPath application to close when users submit the form. I can do this by making the button control work through code that submits the filled-out form first then closes the InfoPath application.&lt;/p&gt;
&lt;p&gt;The problem is that every submit creates a new instance of the form, with a new ID and a new entry in the SharePoint form library. &lt;/p&gt;
&lt;p&gt;Regular old button controls set to use the submit action (no scripting) don&amp;#39;t do that, but they also don&amp;#39;t close InfoPath. I tried closing InfoPath using the OnSubmitRequest event, but nothing happens. And I don&amp;#39;t see a way to add code to the regular old button control that submits. &lt;/p&gt;
&lt;p&gt;I also tried submitting using button rules, but I still get a new form for each submit.&lt;/p&gt;
&lt;p&gt;Making the form fully trusted so I can save on subsequent views instead of submitting is not a viable option. And neither is saving from the file menu because it doesn&amp;#39;t enforce required fields.&lt;/p&gt;
&lt;p&gt;Do I have to ignore my users&amp;#39; requirement to close InfoPath?&lt;/p&gt;
&lt;p&gt;Thanks, Steph&lt;/p&gt;
&lt;p&gt;p.s., I&amp;#39;m not a programmer&lt;/p&gt;&lt;/font&gt;</description></item></channel></rss>