<?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: Can i disable the infopath form screen while I run code in the background?</title><link>https://www.infopathdev.com:443/forums/thread/107348.aspx</link><pubDate>Tue, 12 Jul 2016 18:38:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:107348</guid><dc:creator>ISUGraber</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/107348.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=107348</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Well either if I use a rule to set my textbox&amp;#39;s value when the button I created is clicked or if I do it in code after it&amp;#39;s clicked the textbox that my sections depend upon on to show visible or not doesn&amp;#39;t get updated until the code is finished running through everything....&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;Is there a command to refresh the form or something?&lt;/p&gt;</description></item><item><title>Re: Can i disable the infopath form screen while I run code in the background?</title><link>https://www.infopathdev.com:443/forums/thread/107347.aspx</link><pubDate>Tue, 12 Jul 2016 15:51:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:107347</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/107347.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=107347</wfw:commentRss><description>I&amp;#39;d go with sections since view switching is having a fit - actually, I&amp;#39;d probably test the 2 view switches in the browser first (with both in code) just to see if the form behaves differently in the browser. :)</description></item><item><title>Re: Can i disable the infopath form screen while I run code in the background?</title><link>https://www.infopathdev.com:443/forums/thread/107346.aspx</link><pubDate>Tue, 12 Jul 2016 15:39:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:107346</guid><dc:creator>ISUGraber</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/107346.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=107346</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Yeah that does make sense.  I&amp;#39;m doing something like that for some of my fields within the form.  So I&amp;#39;ll see if I can get that to work.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The rule didn&amp;#39;t seem to work.&amp;nbsp; For whatever&amp;nbsp;reason it didn&amp;#39;t seem to switch the view until after my&amp;nbsp;code ran and I&amp;#39;d still get an error.&amp;nbsp; It was rather odd.&amp;nbsp; I may try it again to see if I did something wrong but I&amp;#39;ll try the section part first.&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Can i disable the infopath form screen while I run code in the background?</title><link>https://www.infopathdev.com:443/forums/thread/107345.aspx</link><pubDate>Tue, 12 Jul 2016 15:06:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:107345</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/107345.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=107345</wfw:commentRss><description>Ugh, I forgot about that.... Well - let&amp;#39;s see. Rules run before code. Maybe your button could have a rule that switches views and your code could switch back? Don&amp;#39;t know if that would work tho... Another option would be to put the main form stuff in a section, and a message in another section (on the same view) and have a helper field for hiding the main section and showing the helper section - we do that sometimes for emailing filler forms when we only want a little piece of the form&amp;#39;s view in email. Then you set the helper field - the main section hides, the message section shows.... after you do your code stuff, you set the helper field back. Does that make sense?</description></item><item><title>Re: Can i disable the infopath form screen while I run code in the background?</title><link>https://www.infopathdev.com:443/forums/thread/107343.aspx</link><pubDate>Tue, 12 Jul 2016 13:29:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:107343</guid><dc:creator>ISUGraber</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/107343.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=107343</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;So I got the Form to switch to my update view when the code begins.&amp;nbsp; And at the end I check to see if I&amp;#39;m still on that form and attempt to switch back.  I got a com error.  I looked it up and it says I can&amp;#39;t switch views multiple times within code supposedly.  Which seems like a very odd limitation.  Below is my code to switch back to my default view.  And below that is my error message.&lt;/p&gt;&lt;p&gt;&lt;font face="Consolas" size="2"&gt;&lt;font face="Consolas" size="2"&gt;               &lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" face="Consolas" size="2"&gt;&lt;font color="#0000ff" face="Consolas" size="2"&gt;&lt;font color="#0000ff" face="Consolas" size="2"&gt;if&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas" size="2"&gt;&lt;font face="Consolas" size="2"&gt; (&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" face="Consolas" size="2"&gt;&lt;font color="#0000ff" face="Consolas" size="2"&gt;&lt;font color="#0000ff" face="Consolas" size="2"&gt;this&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas" size="2"&gt;&lt;font face="Consolas" size="2"&gt;.CurrentView.ViewInfo.Name == &lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" face="Consolas" size="2"&gt;&lt;font color="#a31515" face="Consolas" size="2"&gt;&lt;font color="#a31515" face="Consolas" size="2"&gt;&amp;quot;Update&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas" size="2"&gt;&lt;font face="Consolas" size="2"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;font face="Consolas" size="2"&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;font face="Consolas" size="2"&gt;&lt;p&gt;
&lt;br /&gt;&lt;/p&gt;&lt;p&gt;               {&lt;/p&gt;&lt;p&gt;
&lt;br /&gt;&lt;/p&gt;&lt;/font&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/font&gt;&lt;p&gt;&lt;font face="Consolas" size="2"&gt;&lt;font face="Consolas" size="2"&gt;                   &lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" face="Consolas" size="2"&gt;&lt;font color="#008000" face="Consolas" size="2"&gt;&lt;font color="#008000" face="Consolas" size="2"&gt;//Switch back to original view&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#008000" face="Consolas" size="2"&gt;&lt;font color="#008000" face="Consolas" size="2"&gt;&lt;font color="#008000" face="Consolas" size="2"&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas" size="2"&gt;&lt;font face="Consolas" size="2"&gt;&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Consolas" size="2"&gt;&lt;font face="Consolas" size="2"&gt;                   &lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" face="Consolas" size="2"&gt;&lt;font color="#0000ff" face="Consolas" size="2"&gt;&lt;font color="#0000ff" face="Consolas" size="2"&gt;this&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas" size="2"&gt;&lt;font face="Consolas" size="2"&gt;.ViewInfos.SwitchView(&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" face="Consolas" size="2"&gt;&lt;font color="#a31515" face="Consolas" size="2"&gt;&lt;font color="#a31515" face="Consolas" size="2"&gt;&amp;quot;Request&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas" size="2"&gt;&lt;font face="Consolas" size="2"&gt;);  &lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" face="Consolas" size="2"&gt;&lt;font color="#008000" face="Consolas" size="2"&gt;&lt;font color="#008000" face="Consolas" size="2"&gt;//Causes an error because apparently you can&amp;#39;t switch between views within code....  more than once &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#008000" face="Consolas" size="2"&gt;&lt;font color="#008000" face="Consolas" size="2"&gt;&lt;font color="#008000" face="Consolas" size="2"&gt;
&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font face="Consolas" size="2"&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;font face="Consolas" size="2"&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;
&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;
&lt;br /&gt;&lt;/p&gt;&lt;p&gt;               }&lt;/p&gt;&lt;/font&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/font&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;System.Runtime.InteropServices.COMException&lt;br /&gt;InfoPath cannot execute any view-related object model calls. The view is not ready.&lt;br /&gt;&amp;nbsp;&amp;nbsp; at Microsoft.Office.Interop.InfoPath.SemiTrust.View.SwitchView(String bstrName)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at Microsoft.Office.Interop.InfoPath.SemiTrust.ViewObjectWrapper.SwitchView(String bstrName)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at Microsoft.Office.InfoPath.Internal.ViewInfoCollectionHost.SwitchView(String name)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at QlikAcessRqst.FormCode.CTRL_Submit_Clicked(Object sender, ClickedEventArgs e)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at Microsoft.Office.InfoPath.Internal.ButtonEventHost.OnButtonClick(DocActionEvent pEvent)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent pEvent)&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Can i disable the infopath form screen while I run code in the background?</title><link>https://www.infopathdev.com:443/forums/thread/107342.aspx</link><pubDate>Tue, 12 Jul 2016 12:34:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:107342</guid><dc:creator>ISUGraber</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/107342.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=107342</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Yes it is currently a web form and yes I am submitting this off of a button.&amp;nbsp; My button calls other procedures though.&amp;nbsp; I read about switching views before but am unsure how to do that since this is my first InfoPath form.&amp;nbsp; But I&amp;#39;ll start looking into that more seriously now.&lt;/p&gt;</description></item><item><title>Re: Can i disable the infopath form screen while I run code in the background?</title><link>https://www.infopathdev.com:443/forums/thread/107333.aspx</link><pubDate>Mon, 11 Jul 2016 21:34:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:107333</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/107333.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=107333</wfw:commentRss><description>Is this filler or browser? I think you are using a browser form, if I remember from other threads correctly... I wonder if you could change to an &amp;quot;in progress&amp;quot; view in your code at the beginning of execution, then switch back to the main view in code once your execution was complete? This would only work if your code is running off a button tho - IP won&amp;#39;t let us change views on a field change....</description></item><item><title>Can i disable the infopath form screen while I run code in the background?</title><link>https://www.infopathdev.com:443/forums/thread/107323.aspx</link><pubDate>Fri, 08 Jul 2016 20:31:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:107323</guid><dc:creator>ISUGraber</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/107323.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=107323</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Is there a way I can disable the InfoPath form while I run commands in the background that are updating SQL Server tables via C#?   &lt;/p&gt;&lt;p&gt;&amp;nbsp;Like what you can do with VB&amp;nbsp;&amp;nbsp;&lt;span style="font-size:11pt;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;: Application.ScreenUpdating = False&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;If not does&amp;nbsp;InfoPath have a progress bar I can call that I can&amp;nbsp;update while the processing is being done?&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Thanks&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>