Hidden scetions / Check box - InfoPath Dev
in

InfoPath Dev

Hidden scetions / Check box

Last post 06-26-2009 02:04 PM by dipeshgoel. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 06-22-2009 07:21 AM

    • rhyatt
    • Not Ranked
    • Joined on 06-12-2009
    • Posts 9

    Hidden scetions / Check box

    Ok I am creating a form to be used as a build document. I have created 4 different forms that cover the basic build of a computer. Depending on what form you choose from the drop down list that form will appear. What I would like to do is have sections of the form to be hidden unless certain check boxes have been checked. For instance if the system I am building does not need Office installed. That section of the form would be hidden because I did not check the Office Check Box. I've been trying but have not been able to get it to work. Any help?

    Thanks
    Ron

  • 06-22-2009 07:38 AM In reply to

    • rhyatt
    • Not Ranked
    • Joined on 06-12-2009
    • Posts 9

    Re: Hidden scetions / Check box

    Update. I have been trying every option possible with Conditional formatting to hide these sections unless the box is checked but have not had any luck. I have been able to get tjhe section to hide but never got it to appear when the box was checked.

  • 06-22-2009 08:33 AM In reply to

    Re: Hidden scetions / Check box

    Did you mean 4 separate forms or 4 separate views?  If it's 4 separate forms, then that's an entirely different beast, but I think you mean 4 views in one form.  Hiding sections based off ANY metadata is very simple.  Doing it based off a checkbox, whether using Boolean or text, should be a cinch.  I don't think you've tried everything possible, because I do this all the time - it's very much a native ability of InfoPath design, so you probably just have a simple syntax error.  Attach your template, and I should be able to show you quickly what's wrong.

    Or, if you want to check this one thing, you might figure it out.  If your checkboxes are Boolean fields, and you are using true/false, verify that you have the exact sames syntax in your logic.  TRUE != true and FALSE != false - the same goes for any other references you may be using.

  • 06-22-2009 08:39 AM In reply to

     Please inspect the attached template and see if it is doing anything different from yours.  Here is what I did to create it:

    1. Drag a checkbox into the form (field1 is automatically created as a boolean field and bound to the checkbox).
    2. Drag a section into the form (group1 is automatically created and bound to the section).
    3. Open the section's conditional formatting dialog.
    4. Specify the condition field1 - is not equal to - TRUE (selected TRUE from the dropdown) - Hide this control
    It's usually easiest if the field bound to your checkbox is a boolean field, though that's not strictly necessary.
    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 06-22-2009 09:03 AM In reply to

    • rhyatt
    • Not Ranked
    • Joined on 06-12-2009
    • Posts 9

    Re: Hidden scetions / Check box

    Currently I have not worked with Views yet. Just getting my feet wet with Info path. What I have is a form with multiple sections. Each section is hidden based on Conditional formatting. I should also mention that this form is based off an external SQL DB. Here is an example of the form:

    I have the following sections

    BuildType
    Custom Apps (Office, Adobe, AutoCAD, Corel, ETC) (These were added from my data source and are SimpleType. I can't change that as they are greyed out)
    Laptop Build 1 (Conditional Formatting: Hidden if build type is blank, or equal to Latop Build 2, Laptop Build 3)
    Laptop Build 2 (Conditional Formatting: Hidden if build type is blank, or equal to Latop Build 1, Laptop Build 3)
    Laptop Build 3 (Conditional Formatting: Hidden if build type is blank, or equal to Latop Build 1, Laptop Build 2)
    Office (Conditional Formatting: Hidden if Office, Adobe, Autocad, Corel, ETC is blank)
    Adobe (Conditional Formatting: Hidden if Office, Adobe, Autocad, Corel, ETC is blank)
    Autocad (Conditional Formatting: Hidden if Office, Adobe, Autocad, Corel, ETC is blank)
    Corel (Conditional Formatting: Hidden if Office, Adobe, Autocad, Corel, ETC is blank)
    ETC (Conditional Formatting: Hidden if Office, Adobe, Autocad, Corel, ETC is blank)

    What I was trying to do was include another section of Checkboxes that are for optional software. Check box Values are Cleared=NO Checked=Yes. So if in the custom apps section if Office is checked then the section with the office install procedure will be displayed. Should I be doing this by Views instead? Would that be easier?

    Thanks
    Ron

  • 06-22-2009 09:45 AM In reply to

    Re: Hidden scetions / Check box

     Views might make sense in your design, but they won't necessarily make it any easier.  I'm having trouble what you're describing here:

     Office (Conditional Formatting: Hidden if Office, Adobe, Autocad, Corel, ETC is blank)

    Are Office, Adobe, Autocad, Corel and ETC all different fields?  If so, why would you be hiding Office if any one of them is blank?  Shouldn't the showing/hiding of Office only depend on the corresponding Office field?

     It sounds like what you want to be doing is hiding Office when its corresponding checkbox's field is NO, and showing it when the field is YES.  Have you tried it?  Are the checkboxes located in your main, or secondary data source?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 06-22-2009 10:39 AM In reply to

    • rhyatt
    • Not Ranked
    • Joined on 06-12-2009
    • Posts 9

    Re: Hidden scetions / Check box

    The custom apps are in a secondary data source and Office, Adobe, Autocad, Corel, ETC are all different fields. I wanted to make a multiple selection drop down so I could list all the apps there and not have to do multiple check boxes on the form, and multiple tables in a secondary data source. But I can't add a multiple selection drop down on the form because it has to be bound to a repeating field with a text data type. All my fields are a SimpleType. and because it's an external data source I can't change it. So my previous example was wrong. It should have been just If Office is = NO hide the section. When I tried this it didn't work, but if I said it was less than or equal to NO it worked.

    Thanks
    Ron

  • 06-26-2009 02:04 PM In reply to

    Re: Hidden scetions / Check box

    Regarding the issue of hiding a section - the following condition also works: If this condition is true: Office is not equal to TRUE Then apply this formatting: Hide this control
Page 1 of 1 (8 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.