<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Validation event by clicking a button</title><link>https://www.infopathdev.com:443/forums/thread/60479.aspx</link><pubDate>Tue, 19 Oct 2010 12:58:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:60479</guid><dc:creator>nthaka1</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/60479.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=60479</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi Disha,&lt;/p&gt;&lt;p&gt;If you are using InfoPath 2007 and Browser-compatible form, then while setting validation uncheck the &amp;quot;Show error message immediatly&amp;quot; option. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Validation event by clicking a button</title><link>https://www.infopathdev.com:443/forums/thread/58816.aspx</link><pubDate>Thu, 09 Sep 2010 10:00:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:58816</guid><dc:creator>Disha</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/58816.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=58816</wfw:commentRss><description>&lt;p&gt;Hey ...&lt;/p&gt;
&lt;p&gt;I am facing the same problem. &lt;/p&gt;
&lt;p&gt;Can you please give a detailed explanation of the method you put in the &amp;#39;Onclick&amp;#39; event of the button to add validation to the field. &lt;/p&gt;
&lt;p&gt;tia&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Validation event by clicking a button</title><link>https://www.infopathdev.com:443/forums/thread/14997.aspx</link><pubDate>Thu, 18 Jan 2007 11:45:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14997</guid><dc:creator>Mancha</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14997.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14997</wfw:commentRss><description>Thanks all for your replies.&lt;br /&gt;&lt;br /&gt;I have found another solution. I check many fields in the OnClick event. If an value doesn't exist in the database I set an error object to the element.&lt;br /&gt;XDocument.Errors.Add(...)&lt;br /&gt;The field will be red marked.</description></item><item><title>Re: Validation event by clicking a button</title><link>https://www.infopathdev.com:443/forums/thread/14996.aspx</link><pubDate>Wed, 17 Jan 2007 06:21:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14996</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14996.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14996</wfw:commentRss><description>Hi Mancha,&lt;br /&gt;&lt;br /&gt;First of all I am confirming your requirement is, when you enter data in text box and validation method will call when you click on the button right.&lt;br /&gt;For this you need write code in OnClick event: In this you check values against a database and if doesn#%92t exist in the database set ‘true#%92 value for one new field (my:validate) using below code. This field data type is ‘True/False Boolean#%92 and default value is ‘false#%92.&lt;br /&gt;&lt;br /&gt;i(validation())&lt;br /&gt;{&lt;br /&gt;XDocument.DOM.selectSingleNode(“/my:myFields/my:validate”).text = “true”;&lt;br /&gt;}&lt;br /&gt;ese&lt;br /&gt;{&lt;br /&gt;XDocument.DOM.selectSingleNode(“/my:myFields/my:validate”).text = “false”;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;And in validation () method you need to write code for which type of you want to validate on that field. If will return ‘true#%92 for if the text field data does not exist in database otherwise it returns ‘false#%92. Depends on new field (my:validate) value you put the validation on that field should display red marked. &lt;br /&gt;&lt;br /&gt;If you don#%92t want to write code for this, you need to calculate the same functionality in InfoPath and using rules you can set the true or false to new field. And do the same validation on your field using the new field value (my:validate).</description></item><item><title>Re: Validation event by clicking a button</title><link>https://www.infopathdev.com:443/forums/thread/14995.aspx</link><pubDate>Tue, 16 Jan 2007 14:24:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14995</guid><dc:creator>Mancha</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14995.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14995</wfw:commentRss><description>Hi Shiva,&lt;br /&gt;&lt;br /&gt;can you give me an example? I'm not sure what you mean.&lt;br /&gt;Thanks.</description></item><item><title>Re: Validation event by clicking a button</title><link>https://www.infopathdev.com:443/forums/thread/14994.aspx</link><pubDate>Tue, 16 Jan 2007 09:24:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14994</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14994.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14994</wfw:commentRss><description>Hi Mancha,&lt;br /&gt;&lt;br /&gt;If you want validation on your field after clicking the button then you need to write code in onClick event. In this event depends on your validation you can set set ‘true#%92 or ‘false#%92 value to some other new field (either main DOM or secondary DOM). Depends on new field value you can set the validation on your field in InfoPath.</description></item><item><title>Re: Validation event by clicking a button</title><link>https://www.infopathdev.com:443/forums/thread/14993.aspx</link><pubDate>Mon, 15 Jan 2007 07:30:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14993</guid><dc:creator>Mancha</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14993.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14993</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;I know the OnValidate event. But my problem is all OnValidates events of the textfields should be called when I click the button.&lt;br /&gt;The button checks the values against a database. If a value doesn't exist in the database the textfield should be red marked. The check should not be run after the change of a textfield.&lt;br /&gt;Is there another possibility to solve this?&lt;br /&gt;&lt;br /&gt;</description></item><item><title>Re: Validation event by clicking a button</title><link>https://www.infopathdev.com:443/forums/thread/14992.aspx</link><pubDate>Wed, 10 Jan 2007 09:23:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14992</guid><dc:creator>K.Ramana Reddy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14992.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14992</wfw:commentRss><description>Hi Mancha,&lt;br /&gt;&lt;br /&gt;You can call Onvalidate event for fields by following steps.&lt;br /&gt;1.Double click on any field.&lt;br /&gt;2.Click on DataValidation.&lt;br /&gt;3.Select "OnValidate" event in Events drop down and click on Edit button and write the code.&lt;br /&gt;&lt;br /&gt;You do not need to use Button.&lt;br /&gt;&lt;br /&gt;OnValidate event Occurs after changes to a form's underlying XML document have been accepted but before the OnAfterChange event occurs.&lt;br /&gt;&lt;br /&gt;The OnValidate event is typically used for handling errors and working with the Errors collection&lt;br /&gt;&lt;br /&gt;I Hope this will help for you.&lt;br /&gt;&lt;br /&gt;Thanks.&lt;br /&gt;&lt;br /&gt;</description></item><item><title>Re: Validation event by clicking a button</title><link>https://www.infopathdev.com:443/forums/thread/14991.aspx</link><pubDate>Wed, 10 Jan 2007 09:05:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14991</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14991.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14991</wfw:commentRss><description>Yes, you can implement an OnValidate event handler which will be called. You can also write OnBeforeChange and OnAfterChange event handlers. Have fun!</description></item><item><title>Re: Validation event by clicking a button</title><link>https://www.infopathdev.com:443/forums/thread/14990.aspx</link><pubDate>Wed, 10 Jan 2007 07:57:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14990</guid><dc:creator>Mancha</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14990.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14990</wfw:commentRss><description>Hi Patrick,&lt;br /&gt;&lt;br /&gt;thanks for your reply.&lt;br /&gt;And can I call an OnValidate event again when I click the button by using the EventHandler? &lt;br /&gt;&lt;br /&gt;</description></item><item><title>Re: Validation event by clicking a button</title><link>https://www.infopathdev.com:443/forums/thread/14989.aspx</link><pubDate>Tue, 09 Jan 2007 20:44:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14989</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14989.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14989</wfw:commentRss><description>Hi Mancha,&lt;br /&gt;This is by design. InfoPath does data type and conditional validation when you finish editing the field. You can't postpone that.</description></item><item><title>Validation event by clicking a button</title><link>https://www.infopathdev.com:443/forums/thread/13023.aspx</link><pubDate>Tue, 09 Jan 2007 16:28:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13023</guid><dc:creator>Mancha</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13023.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13023</wfw:commentRss><description>Hi all,&lt;br /&gt;&lt;br /&gt;I have a repeating table with different datas. Every field has a validation event. The validation events should be fired when I click the button. The validation should not be fired after leave a field.&lt;br /&gt;Can anybody help me to use the problem?&lt;br /&gt;Thanks.</description></item></channel></rss>