<?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: Validating blank field</title><link>https://www.infopathdev.com:443/forums/thread/53768.aspx</link><pubDate>Fri, 16 Apr 2010 13:05:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53768</guid><dc:creator>casiviani</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53768.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=53768</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Thanks !! I used the second option and it works great!!!&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;=) &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Validating blank field</title><link>https://www.infopathdev.com:443/forums/thread/53751.aspx</link><pubDate>Fri, 16 Apr 2010 05:16:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53751</guid><dc:creator>Qazi Anis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53751.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=53751</wfw:commentRss><description>&lt;p&gt;you can do two things to avoid this. &lt;/p&gt;
&lt;p&gt;1) use conditional formatting to hide the query button if IDEmployee is blank.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; right click on the query button-&amp;gt; click conditional formatting. -&amp;gt; add new&lt;/p&gt;
&lt;p&gt;&amp;nbsp;if IDEmployee is blank&lt;/p&gt;
&lt;p&gt;disable/hide the field&lt;/p&gt;
&lt;p&gt;2) Set rules on the query button, to prevent actual querying if IDEmployee is blank.&lt;/p&gt;
&lt;p&gt;right clik on the query button and a rule&lt;/p&gt;
&lt;p&gt;if IDEmployee is blank&lt;/p&gt;
&lt;p&gt;Set&amp;nbsp;&amp;nbsp;value of field&amp;nbsp;error_label -&amp;gt; Cannot be blank&lt;/p&gt;
&lt;p&gt;check stop processing rules when this rule finishes.&lt;/p&gt;
&lt;p&gt;on second rule do the actual querying&lt;/p&gt;</description></item><item><title>Validating blank field</title><link>https://www.infopathdev.com:443/forums/thread/53735.aspx</link><pubDate>Thu, 15 Apr 2010 16:45:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53735</guid><dc:creator>casiviani</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53735.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=53735</wfw:commentRss><description>&lt;p&gt;Hello, this my first time working with Infopath and I have to do some validation for some task...&lt;/p&gt;

&lt;p&gt;My Form works with a datasource for receive and send information about employees, for receive info I placed the IDEmployee as query field... with this I have a trouble.... when I don&amp;#39;t type anything on the Control (IDEmployee is blank) and clic the &amp;quot;Run Query&amp;quot; button (this is configured as Infopath did) I want to validate that field before to execute, because when it Execute without parameters it returns all the fields from the database... this an example.&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;Employee ID:___ 
&amp;nbsp; (In the textbox its assigned to the @IDEmployee query field as it&amp;#39;s displayed)&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;Employee Name:___  (This should show the Employee name after execute the search using the @IDEmployee)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;the case is, if the Employee Id TextBox(@IDEmployee) its blank and I click on &amp;quot;Search&amp;quot; butto i need to to fire some message like &amp;quot;Please write an Employee ID.&amp;quot; and cancel the execution of the button.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;please, if some one have any idea about this case... help me =(&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;note that the button doesn&amp;#39;t have custom code, i run the query or consult by the default execution for that button as the submit case.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;thanks &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>