<?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>Controls</title><link>https://www.infopathdev.com:443/forums/43.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Count of a multiple-selection list box.</title><link>https://www.infopathdev.com:443/forums/thread/96979.aspx</link><pubDate>Fri, 11 Apr 2014 08:24:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:96979</guid><dc:creator>holdemryan</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/96979.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=96979</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m getting some odd behaviour for this. MSLB has a rule when Field Value changes a simple Count(MSLBFieldName) and the default value for the traget field has the same.&lt;/p&gt;&lt;p&gt;The value starts off at 1 before I&amp;#39;ve even started selecting items in the MSLB. It then adds and removes correctly, but it is still 1 ahead of the actual number of items selected.&lt;/p&gt;</description></item><item><title>Re: Count of a multiple-selection list box.</title><link>https://www.infopathdev.com:443/forums/thread/91430.aspx</link><pubDate>Tue, 16 Jul 2013 10:47:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:91430</guid><dc:creator>Monali</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/91430.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=91430</wfw:commentRss><description>What i understood is ,one rule  on multiple selection listbox and default value for text box.
Can you please explain how to set that rule ,expression.
I tried with,i copied the xpath of multiple selection and pasted in the rule.
but not working</description></item><item><title>Re: Count of a multiple-selection list box.</title><link>https://www.infopathdev.com:443/forums/thread/54612.aspx</link><pubDate>Thu, 06 May 2010 17:02:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54612</guid><dc:creator>Catharine</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54612.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=54612</wfw:commentRss><description>&lt;p&gt;Thank you very much for this - I thought I understood it... didn&amp;#39;t you just know there was going to be a but.&lt;/p&gt;
&lt;p&gt;I have a repeating field /my:myFields/my:SKUIntroductionGroup/my:Region.&amp;nbsp; This is a multi-select box on the form.&lt;/p&gt;
&lt;p&gt;I want to ensure that the user selects at least one value.&amp;nbsp; I cannot use &amp;quot;cannot be blank&amp;quot; property because there is always a blank one... unless I use code to delete it.&lt;/p&gt;
&lt;p&gt;So I thought I would have a temporary variable that I could update with the count of non blank regions - and then base a validation on that count.&amp;nbsp;&amp;nbsp; Using the help above I have put a rule on my:Region&amp;nbsp; to&amp;nbsp; update a temporary variable&amp;nbsp; with count(../my:Region[. != &amp;quot;&amp;quot;]).&lt;/p&gt;
&lt;p&gt;This works when you are adding regions - but is not fired when you untick a box.&amp;nbsp; If the last thing you do is untick - then the count is wrong.&lt;/p&gt;
&lt;p&gt;What have I missed ?&amp;nbsp; Is there a better way to validate that at least one Region is non blank&lt;/p&gt;
&lt;p&gt;Catharine&lt;/p&gt;</description></item><item><title>Re: Count of a multiple-selection list box.</title><link>https://www.infopathdev.com:443/forums/thread/48095.aspx</link><pubDate>Wed, 21 Oct 2009 14:11:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:48095</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/48095.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=48095</wfw:commentRss><description>&lt;p&gt;I just tried this for myself, and found it&amp;#39;s a little tricky because of the way multi-select list boxes add and remove nodes on the fly.&amp;nbsp; The solution I found requires a combination of a rule and a default value.&lt;/p&gt;&lt;p&gt;&amp;nbsp;First, change the expression in your rule to:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&amp;nbsp;count(../my:Type_of_Policy_Referred)&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;(I&amp;#39;m assuming &lt;b&gt;my:&lt;/b&gt; is the right prefix, but it might be something else).&lt;/p&gt;&lt;p&gt;Then set the default value on Number_Of_Policies the same way you did in your button rule, by inserting the count() function and using the Select node... dialog to insert the node reference inside. &lt;/p&gt;&lt;p&gt;&amp;nbsp;Those two together should do the trick. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Count of a multiple-selection list box.</title><link>https://www.infopathdev.com:443/forums/thread/48089.aspx</link><pubDate>Wed, 21 Oct 2009 13:16:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:48089</guid><dc:creator>TiltnSpill</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/48089.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=48089</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Count of a multiple-selection list box.</title><link>https://www.infopathdev.com:443/forums/thread/48088.aspx</link><pubDate>Wed, 21 Oct 2009 13:15:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:48088</guid><dc:creator>TiltnSpill</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/48088.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=48088</wfw:commentRss><description>&lt;p&gt;Hey Jimmy, THis is actually what I&amp;#39;m attemptingto do!&amp;nbsp; I created a rule in the multi-select list box to set the value of my other field to Count(multi-select field).&lt;/p&gt;
&lt;p&gt;The problem is it will only display a count of 1.&amp;nbsp; Attached are pictures of what I tried to do.&amp;nbsp; Name of my listbox field is Type_of_Policy_Referred and my field i&amp;#39;m trying to set is called Number_Of_Policies.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Count of a multiple-selection list box.</title><link>https://www.infopathdev.com:443/forums/thread/48086.aspx</link><pubDate>Wed, 21 Oct 2009 13:01:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:48086</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/48086.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=48086</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Neat.&amp;nbsp; You might also try doing that from a rule on the list box&amp;#39;s field, so that users don&amp;#39;t have to press a button to update the number.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Count of a multiple-selection list box.</title><link>https://www.infopathdev.com:443/forums/thread/48082.aspx</link><pubDate>Wed, 21 Oct 2009 12:32:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:48082</guid><dc:creator>TiltnSpill</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/48082.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=48082</wfw:commentRss><description>&lt;p&gt;Hey Jimmy,&lt;/p&gt;
&lt;p&gt;Thanks for the reply.&amp;nbsp; I was just using the Count() function wrong.&amp;nbsp; I tried using it as the default value for my textbox (to update when a field changes.) but it would only update once.&lt;/p&gt;
&lt;p&gt;I simply created a button that gets the count AFTER information is entered into the multiple-selection box.&lt;/p&gt;</description></item><item><title>Re: Count of a multiple-selection list box.</title><link>https://www.infopathdev.com:443/forums/thread/48070.aspx</link><pubDate>Wed, 21 Oct 2009 01:03:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:48070</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/48070.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=48070</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;The count() function is the way to go.&amp;nbsp; Could you show us a small description of the area of your data source where the listbox is bound (a screenshot, or a simple mock-up in text), tell us to which field the listbox is bound, and show us the count() formula you&amp;#39;re trying to use?&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Count of a multiple-selection list box.</title><link>https://www.infopathdev.com:443/forums/thread/48058.aspx</link><pubDate>Tue, 20 Oct 2009 19:07:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:48058</guid><dc:creator>TiltnSpill</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/48058.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=48058</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Good afternoon.&lt;/p&gt;&lt;p&gt;&amp;nbsp;I&amp;#39;m having a terrible time with something that &lt;b&gt;SEEMS&lt;/b&gt; relatively easy. I have 2 fields, Insurance_Products and Number_Of_Policies.&amp;nbsp; Insurance products is a multiple selection box with 12 entries in it.&amp;nbsp; All i&amp;#39;m trying to do is set the Number_Of_Policies field to equal the number of selected items inthe Insurance_Products box.&amp;nbsp; (So if the user selects Home, Auto and Life from the Insurance_products box, Number_Of_Policies should equal 3.)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I for the life of me cannot figure out how to do this.&amp;nbsp; I&amp;#39;ve tried using the count function (only returns a value of 1) and tried just incrementing the Number_Of_Policies field. (This doesn&amp;#39;t work because I cannot figure out how to subtract from the field is an item in Insurance_Products is de-selected.)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Any help on this would be greatly appreciated. &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>