<?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>Hide a field based on another field's count</title><link>https://www.infopathdev.com:443/forums/thread/97056.aspx</link><pubDate>Thu, 17 Apr 2014 20:36:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:97056</guid><dc:creator>Araby</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/97056.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=97056</wfw:commentRss><description>&lt;p&gt;Hi,&amp;nbsp;I have a form where I am trying to hide a text field when two multiple select list boxes each have at least one selection made.&amp;nbsp;&amp;nbsp;The two MSLB&amp;nbsp;are conditionally required when another field is selected.&amp;nbsp;&amp;nbsp;You can&amp;#39;t normally have validation rules on MSLB, but I was&amp;nbsp;able to achieve this&amp;nbsp;by following the directions from another forum post on this site.&amp;nbsp; Here is the post I started with: &amp;nbsp;&lt;a href="http://www.infopathdev.com/forums/p/24020/83245.aspx"&gt;http://www.infopathdev.com/forums/p/24020/83245.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;In my form, if&amp;nbsp;field &amp;quot;DB2&amp;quot;&amp;nbsp;= true, then MSLB #1 and MSLB #2 must each have at least one choice selected.&amp;nbsp; MSLB #1 has choices A and B.&amp;nbsp;&amp;nbsp;MSLB #2 has choices C and D.&amp;nbsp; I created a text field called &amp;quot;Error&amp;quot;&amp;nbsp;as described in the above post, put the validation rule on it, and&amp;nbsp;that is working as it should.&lt;/p&gt;&lt;p&gt;What I would like to do is&amp;nbsp;hide the&amp;nbsp;&amp;quot;Error&amp;quot; text box&amp;nbsp;once the multiple select list boxes have at least one selection, each.&amp;nbsp; &lt;/p&gt;&lt;p&gt;What I can&amp;#39;t figure out, though, is how to set the condition for this.&amp;nbsp; I tried using this expression as the formatting rule condition:&amp;nbsp;&lt;strong&gt;&lt;em&gt;count(../my:group1/my:field1[. != &amp;quot;&amp;quot;]) != 0&lt;/em&gt;&lt;/strong&gt;&amp;nbsp; I checked the expression in a builder and it validated with no errors, but the &amp;quot;error&amp;quot; field is not being hidden when the appropriate selections are made.&lt;/p&gt;&lt;p&gt;I&amp;#39;m using&amp;nbsp;InfoPath 2010 and preparing a browser-based&amp;nbsp;form&amp;nbsp;for a SharePoint form library.&lt;/p&gt;&lt;p&gt;Any help is greatly appreciated!&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>