<?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: Submit form with confirmation (rule or code)</title><link>https://www.infopathdev.com:443/forums/thread/57661.aspx</link><pubDate>Thu, 05 Aug 2010 05:34:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:57661</guid><dc:creator>jayanaveen</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/57661.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=57661</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;while&amp;nbsp;executing a infopath form, always rules associated to the control will&amp;nbsp;trriger first then the functions will be executed.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;To submit infopath forn using vbscript . try the following code&lt;/p&gt;
&lt;p&gt;XDocument.DataAdapters(&amp;quot;Data Connection Name&amp;quot;).Submit&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Naveen.&lt;/p&gt;</description></item><item><title>Re: Submit form with confirmation (rule or code)</title><link>https://www.infopathdev.com:443/forums/thread/46194.aspx</link><pubDate>Tue, 25 Aug 2009 03:59:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:46194</guid><dc:creator>sanrajesh</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/46194.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=46194</wfw:commentRss><description>&lt;p&gt;Hi, &lt;/p&gt;
&lt;p&gt;&amp;nbsp;Anyone got the solution for this? I need to execute the script before the rules. I&amp;#39;m using InfoPath 2003. &lt;/p&gt;
&lt;p&gt;The confirmation message &amp;quot;XDocument.UI.Confirm(&amp;quot;Do you want to submit this request?&amp;quot;,1);&amp;quot; shows after the rules executed. But I require it in reverse.&lt;/p&gt;
&lt;p&gt;- Sanrajesh&lt;/p&gt;</description></item><item><title>Re: Submit form with confirmation (rule or code)</title><link>https://www.infopathdev.com:443/forums/thread/35081.aspx</link><pubDate>Mon, 01 Dec 2008 12:24:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35081</guid><dc:creator>soldier</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35081.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35081</wfw:commentRss><description>&lt;p&gt;Hi Jimmy thanks for the response,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Im using Infopath 2007, I intend to use C# and require to use JScript for prompts and dialog boxes. I need to add also if there&amp;#39;s a way to have those features workable in Forms Services (web browser-enabled). I think these features do not work for some compatibility reasons. Note that the form is associated in sharepoint library and gets data from lists uploaded into the sharepoint portal as well...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks &lt;/p&gt;</description></item><item><title>Re: Submit form with confirmation (rule or code)</title><link>https://www.infopathdev.com:443/forums/thread/35043.aspx</link><pubDate>Sun, 30 Nov 2008 11:36:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35043</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35043.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35043</wfw:commentRss><description>&lt;p&gt;What type of code do you plan to use (C#, VB...)?&amp;nbsp; Are you using InfoPath 2003 and require using JScript or VBScript?&lt;/p&gt;</description></item><item><title>Re: Submit form with confirmation (rule or code)</title><link>https://www.infopathdev.com:443/forums/thread/35042.aspx</link><pubDate>Sat, 29 Nov 2008 18:12:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35042</guid><dc:creator>soldier</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35042.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35042</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hello Anuma, I appreciate your taking the initiative to help out in this matter.To answer your question, the infopath submits to a Sharepoint Form Library.But the answer you gave me I&amp;#39;m already aware of.My case requires that I need to add some code into the form to make it pop up a prompt message or alert asking me to confirm the click event before submitting the filled form (&amp;quot;Are you sure you want to submit?&amp;quot;) . I can&amp;#39;t seem to be able to find my way through that.any visual or detailed tutorial will be much appreciated... Thanks,&lt;br /&gt;&lt;br /&gt;Soldier&lt;/p&gt;</description></item><item><title>Re: Submit form with confirmation (rule or code)</title><link>https://www.infopathdev.com:443/forums/thread/35037.aspx</link><pubDate>Sat, 29 Nov 2008 05:43:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35037</guid><dc:creator>Anuma</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35037.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35037</wfw:commentRss><description>&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;Hello,&lt;/font&gt;&lt;/p&gt;&lt;font face="Times New Roman" size="3"&gt;&amp;nbsp;&lt;/font&gt; 
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;You can do this by using rules.&lt;/font&gt;&lt;/p&gt;&lt;font face="Times New Roman" size="3"&gt;&amp;nbsp;&lt;/font&gt; 
&lt;ol style="MARGIN-TOP:0in;"&gt;
&lt;li class="MsoNormal" style="MARGIN:0in 0in 0pt;mso-list:l0 level1 lfo1;tab-stops:list .5in;"&gt;&lt;font face="Times New Roman" size="3"&gt;Double click on the button.&lt;/font&gt;&lt;/li&gt;
&lt;li class="MsoNormal" style="MARGIN:0in 0in 0pt;mso-list:l0 level1 lfo1;tab-stops:list .5in;"&gt;&lt;font face="Times New Roman" size="3"&gt;Add Rule to submit data connection.&lt;/font&gt;&lt;/li&gt;
&lt;li class="MsoNormal" style="MARGIN:0in 0in 0pt;mso-list:l0 level1 lfo1;tab-stops:list .5in;"&gt;&lt;font face="Times New Roman" size="3"&gt;Add second rule to show “Successful” message.&lt;/font&gt;&lt;/li&gt;
&lt;ol style="MARGIN-TOP:0in;"&gt;
&lt;li class="MsoNormal" style="MARGIN:0in 0in 0pt;mso-list:l0 level2 lfo1;tab-stops:list 1.0in;"&gt;&lt;font face="Times New Roman" size="3"&gt;Click on the Rules.&lt;/font&gt;&lt;/li&gt;
&lt;li class="MsoNormal" style="MARGIN:0in 0in 0pt;mso-list:l0 level2 lfo1;tab-stops:list 1.0in;"&gt;&lt;font face="Times New Roman" size="3"&gt;Click on Add Action button.&lt;/font&gt;&lt;/li&gt;
&lt;li class="MsoNormal" style="MARGIN:0in 0in 0pt;mso-list:l0 level2 lfo1;tab-stops:list 1.0in;"&gt;&lt;font face="Times New Roman" size="3"&gt;Select “Show a dialogue box Message” from action dropdown.&lt;/font&gt;&lt;/li&gt;
&lt;li class="MsoNormal" style="MARGIN:0in 0in 0pt;mso-list:l0 level2 lfo1;tab-stops:list 1.0in;"&gt;&lt;font face="Times New Roman" size="3"&gt;Enter you message and Click on ok.&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;font face="Times New Roman" size="3"&gt;&amp;nbsp;&lt;/font&gt; 
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;Are you submitting the form to SharePoint or any other?&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Submit form with confirmation (rule or code)</title><link>https://www.infopathdev.com:443/forums/thread/35029.aspx</link><pubDate>Fri, 28 Nov 2008 16:06:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35029</guid><dc:creator>soldier</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35029.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35029</wfw:commentRss><description>&lt;p&gt;Hello Matt, I&amp;#39;ve been trying to do this for quite a while,this is the first time I code infopath. So if you can please give me a detailed tutorial on how to do this would be greatly appreciated. I need details on where to place the code (the whole thing). I got a project to deliver in the next couple of days and your guidance will be great.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Soldier&lt;/p&gt;</description></item><item><title>Re: Submit form with confirmation (rule or code)</title><link>https://www.infopathdev.com:443/forums/thread/3361.aspx</link><pubDate>Thu, 26 Oct 2006 11:59:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:3361</guid><dc:creator>Guapo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/3361.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=3361</wfw:commentRss><description>Thanks for your fast reply Matt.&lt;br /&gt;&lt;br /&gt;That code resolves my 3) question.&lt;br /&gt;&lt;br /&gt;I will explain better my introduction to 3) question: I have putted the KB article code on the "onClick" function of a button. The user can click the button, even if there are red asteriscs and red boxed fields, and the code would not validate that and save the form anyway.&lt;br /&gt;&lt;br /&gt;With the code you provided i can now cancel the submission with the same message that appears using the data connection submission.&lt;br /&gt;&lt;br /&gt;Back to my 1) problem, if i have a button with associated rules and code, the rules run first, then the code. How can i set the other way around? &lt;br /&gt;(I would code a confirmation dialog, and use the submit data connection rule)</description></item><item><title>Re: Submit form with confirmation (rule or code)</title><link>https://www.infopathdev.com:443/forums/thread/3360.aspx</link><pubDate>Wed, 25 Oct 2006 21:51:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:3360</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/3360.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=3360</wfw:commentRss><description>It is my understanding that you do not have to trigger data validation that is built into the XML schema/ XSL.  I think what you are trying to do is check to see if any of the validations have been broken before you try to submit to SharePoint so that the error message will not popup.&lt;br /&gt;&lt;br /&gt;To do this, try this code (I haven't done JScript in a while, so it might be off a little):&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;if( XDocument.Errors.Count &amp;gt; 0 )&lt;br /&gt;{&lt;br /&gt;    XDocument.UI.Alert( "There are errors in the form, please correct these and try again." );&lt;br /&gt;&lt;br /&gt;    // Return the OnClick event handler because we do not want to submit to the datat connection.&lt;br /&gt;    return;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I hope this helps!</description></item><item><title>Submit form with confirmation (rule or code)</title><link>https://www.infopathdev.com:443/forums/thread/1627.aspx</link><pubDate>Wed, 25 Oct 2006 18:35:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:1627</guid><dc:creator>Guapo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/1627.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=1627</wfw:commentRss><description>Hello all&lt;br /&gt;&lt;br /&gt;I have created a infopath 2003 sp2 template that can be submited to 3 sharepoint libraries (Wss v2). I have 3 buttons with rules using 3 different submit data connections.&lt;br /&gt;Using the button properties and rules, it works great, BUT, i require that a confirmation dialog to appear before proceeding with the submission.&lt;br /&gt;&lt;br /&gt;1) Is there a way using rules?&lt;br /&gt;&lt;br /&gt;I already tried a different approach using code.&lt;br /&gt;By using the following code i can ask the confimation, but i can not "trigger" the &lt;br /&gt;submit data connections.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;XDocument.UI.Confirm("Do you want to submit this request?",1);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2) Can i "trigger" the submit to wss form libs data connections from code?&lt;br /&gt;&lt;br /&gt;So i went off again and found this KB article on submitting via http using jscript:&lt;a target="_blank" href=http://support.microsoft.com/kb/826993&gt;http://support.microsoft.com/kb/826993&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If  use the submit from File Menu, it only allows to continue if validations are OK, BUT, using a button to run the code it does NOT validate "can not be blank fields, etc".&lt;br /&gt;&lt;br /&gt;3) How can i trigger validation, and get a result ( OK or failed) using jscript, so that i can prevent the submit action?&lt;br /&gt;&lt;br /&gt;Thank you very much. So far this is the best Inpath knoledge center I know.&lt;br /&gt;&lt;pre&gt;&lt;/pre&gt;</description></item></channel></rss>