Hiding Repeating Section and 'Insert Item' text - InfoPath Dev
in

InfoPath Dev

Hiding Repeating Section and 'Insert Item' text

Last post 08-11-2013 01:52 PM by skarden. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 12-08-2009 03:28 AM

    • orion
    • Not Ranked
    • Joined on 11-10-2009
    • Posts 7

    Hiding Repeating Section and 'Insert Item' text

    Hi,

    I have added a repeating section to my form which is hidden until the user makes a selection from a drop down list. Although the section hides ok the text 'Insert item' is still displaying. 

    I want this text to be hidden when the section is hidden and only show when the repeating section shows. Is this possible?

    Thanks for your help.

  • 12-08-2009 03:46 AM In reply to

    Re: Hiding Repeating Section and 'Insert Item' text

    Placing "hide this control" conditional formatting on a repeating section hides the individual rows, not the entire section.  You should place your repeating section inside a non-repeating section and hide that instead.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 12-08-2009 05:29 AM In reply to

    • orion
    • Not Ranked
    • Joined on 11-10-2009
    • Posts 7

    Re: Hiding Repeating Section and 'Insert Item' text

    That works great, thanks!
  • 07-05-2013 09:52 AM In reply to

    • skarden
    • Not Ranked
      Male
    • Joined on 06-07-2013
    • Orlando, FL
    • Posts 12

    Re: Hiding Repeating Section and 'Insert Item' text

    I too have a repeating section, but I don't want to show/hide the entire repeating section, I want to be able to show/hide individual sections of the repeating section. By placing a button within the repeating section I found that I can use that to hide an individual section. Naturally, as that part of the repeating section then becomes hidden, the button becomes hidden too. My problem is how can I show that individual section again?
  • 07-07-2013 11:34 AM In reply to

    Re: Hiding Repeating Section and 'Insert Item' text

    I think it's a bit of a question for you how you would like the logistics of revealing hidden sections to work, but here is one idea.

    I assume you already have something like this:

    • A field in the repeating group called Hidden
    • A button that sets Hidden = true
    • Conditional formatting on the repeating section with the condition Hidden = true -> Hide

    How about adding this to your form

    • Add a boolean field outside the repeating group called ShowAll, and show this as a checkbox in your form. Have it default to false
    • Modify the conditional formatting on the repeating section to condition: Hidden = true AND ShowAll != true -> Hide (here != means "is not equal to")
    • Add a new button in the repeating section that sets Hidden = false
    • Hide the Hide button when Hidden = true and hide the Show button when Hidden != true

    This should provide you a way to show all the hidden sections, and mark them as un-hidden if you need to.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 08-11-2013 01:52 PM In reply to

    • skarden
    • Not Ranked
      Male
    • Joined on 06-07-2013
    • Orlando, FL
    • Posts 12

    Re: Hiding Repeating Section and 'Insert Item' text

    Thanks. I have it figured out. In either a repeating or optional section I put in another section where my controls will go. I then put a button in the repeating or optional section just below the nested section that holds the controls. Next to the button I put a hidden textbox next to the button. (To hide the textbox I create a Formatting Rule that if the expression 1=1 then hide the control. Note: don't set that while testing so you'll see the text and be sure it alternates between Show and Hide as described below). I then set the textbox value to Hide. I create 2 rules for the button. If the value of the textbox is Hide I change it to Show (and to stop there) and other the sets it to Hide if it is show. I also go into the button's properties and set the name of the button to the the value of the textbox + the name of the section. That way it will auto-change to Hide/Show MySection when it is clicked. I then set a rule for the nested section that if the value of the textbox is "Show" I hide it. The reason this seems reversed is that because I'm using the textbox value to name the button (so it alternates between Show/Hide the Section) then when the button/tetxbox says Hide the Section, the section is visible and when the button/textbox say Show the Section it is because it is hidden. Because my button is inside the repeating/optional section it isn't visible until the user adds the section. Plus, if the user removes the section the repeating/optional section the button disappears as well. Hope that makes sense. It is actually very easy to set up and works like a charm
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.