How do I "hide" a section in one view based on the button value from another view? - InfoPath Dev
in

InfoPath Dev

How do I "hide" a section in one view based on the button value from another view?

Last post 03-16-2009 05:38 PM by Jimmy. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-16-2009 10:38 AM

    • jim_r
    • Not Ranked
    • Joined on 03-09-2009
    • Posts 6

    How do I "hide" a section in one view based on the button value from another view?

    Hi again,

    I looked for this in the help, couldn't find the answer, so here I am.

    I figured out how to change views with buttons earlier today thanks to Anuma.  Now I need to figure out how to hide a section in one view based on which button a user selected in another view.

    There doesn't seem to be a "stock" option for this, since the only "non-customized" methods I can use to hide/show a section involve conditional formatting.  Do I need to create a custom script?

    For example, the billing county only displays if a user selects button A or B in the "Start Up" view.  I created a section called "billing_county_group" and within it a field called "billing_county". If the user selects button A or B in Start Up, the billing_county_group must be hidden.  There are actually about 7 sections in the Data Entry view that need to be "hidden" if a user selects the A or B button.

    Any ideas?  In the meantime, I'll keep looking for an answer.

    Thanks again,

    Jim

  • 03-16-2009 05:38 PM In reply to

    Re: How do I "hide" a section in one view based on the button value from another view?

    Hello Jim, and welcome to the forum.  There is a very simple way to do this:

    1. Create a field in your data source to hold a value to reflect which button was pressed.
    2. Create a rule in each of your change view buttons to set a value in this field, depending on which button it was. For example if someone clicks the A button, specify a rule on the A button to set the field's value to "A."
    3. Use conditional formatting on the section to hide the section if the field has certain values.
    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.