<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: custom error message browser based form in infopath 2007</title><link>https://www.infopathdev.com:443/forums/thread/65537.aspx</link><pubDate>Tue, 29 Mar 2011 00:16:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:65537</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/65537.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=65537</wfw:commentRss><description>&lt;p&gt;This &lt;a href="http://msdn.microsoft.com/en-us/library/bb509311(v=office.12).aspx" target="_blank"&gt;MSDN link&lt;/a&gt; may help you. Just add a secondary XML data source to your form, and have a node in it that you set to your error message. Display the node on the form when it has a value. Add some logic to clear the error -- maybe an &amp;quot;OK&amp;quot; button on the form or something.&lt;/p&gt;</description></item><item><title>Re: custom error message browser based form in infopath 2007</title><link>https://www.infopathdev.com:443/forums/thread/65511.aspx</link><pubDate>Mon, 28 Mar 2011 17:49:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:65511</guid><dc:creator>BMARU</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/65511.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=65511</wfw:commentRss><description>&lt;p&gt;Can you please provide sample code for that?&lt;/p&gt;</description></item><item><title>Re: custom error message browser based form in infopath 2007</title><link>https://www.infopathdev.com:443/forums/thread/65481.aspx</link><pubDate>Mon, 28 Mar 2011 12:51:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:65481</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/65481.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=65481</wfw:commentRss><description>&lt;p&gt;Well, you could set a field in a secondary data source to the ex.message and if that field was mapped to the view, it would show the error message. &lt;/p&gt;</description></item><item><title>custom error message browser based form in infopath 2007</title><link>https://www.infopathdev.com:443/forums/thread/65480.aspx</link><pubDate>Mon, 28 Mar 2011 11:38:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:65480</guid><dc:creator>BMARU</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/65480.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=65480</wfw:commentRss><description>&lt;p&gt;How can we show custom erro message in infopath 2007 with browser based forms....&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;as we have in 2003 infopath like below&lt;/p&gt;
&lt;p&gt;try{ &amp;nbsp;&lt;br /&gt;&amp;nbsp; if(XDocument.Errors.length!=0) // analyse are there some errors in the form&lt;br /&gt;&amp;nbsp; { &amp;nbsp; &amp;nbsp;//show the message of the first error in the form&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; XDocument.UI.Alert(XDocument.Errors.Item(0).DetailedErrorMessage);&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; else&lt;br /&gt;&amp;nbsp; { &amp;nbsp; &amp;nbsp; //submit the form to a database&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; XDocument.Submit();&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;catch(ex)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; XDocument.UI.Alert(ex.message);&lt;br /&gt;}&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>