Hide a field based on another field's count - InfoPath Dev
in

InfoPath Dev

Hide a field based on another field's count

Last post 04-17-2014 01:36 PM by Araby. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 04-17-2014 01:36 PM

    • Araby
    • Not Ranked
      Female
    • Joined on 04-17-2014
    • Memphis, TN
    • Posts 1

    Hide a field based on another field's count

    Hi, 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.  The two MSLB are conditionally required when another field is selected.  You can't normally have validation rules on MSLB, but I was able to achieve this by following the directions from another forum post on this site.  Here is the post I started with:  http://www.infopathdev.com/forums/p/24020/83245.aspx

    In my form, if field "DB2" = true, then MSLB #1 and MSLB #2 must each have at least one choice selected.  MSLB #1 has choices A and B.  MSLB #2 has choices C and D.  I created a text field called "Error" as described in the above post, put the validation rule on it, and that is working as it should.

    What I would like to do is hide the "Error" text box once the multiple select list boxes have at least one selection, each. 

    What I can't figure out, though, is how to set the condition for this.  I tried using this expression as the formatting rule condition: count(../my:group1/my:field1[. != ""]) != 0  I checked the expression in a builder and it validated with no errors, but the "error" field is not being hidden when the appropriate selections are made.

    I'm using InfoPath 2010 and preparing a browser-based form for a SharePoint form library.

    Any help is greatly appreciated! 

Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.