InfoPath won't let you collapse/expand a repeating table, but you can show/hide each instance of it. Depending on whether you also need to hide some of the text associated with your repeating tables, you can either put a formatting rule directly on the repeating table and hide that under certain conditions, or else you can create a smaller section within your large section and put some of the text from the large section in there along with one of your repeating tables and put your formatting rule on the smaller section to show/hide that.
If you meant to say that you are looking to expand/collapse each instance of a repeating section instead of a repeating table, you can still do that. I'd probably put a button called Show/Hide Section at the bottom of the repeating section control and a textbox called txtHideSection, which I would add a formatting rule to always hide (I use the condition 1=1 for that - because it will always evaluate to true) and set to No by default. Then I'd put a formatting rule on the repeating section and set it to hide whenever txtHideSection is Yes. Then I'd put 2 action rules on my button as follows:
- If txtHideSection is not Yes (i.e. blank or No), set txtHideSection to Yes (and stop running any more rules - there should be a checkbox for that -if you don't set this, both rules will always run and txtHideSection will always be No - and therefore never hidden)
- If txtHideSection is Yes, set txtHideSection to No.
That should cause the button to act like a toggle to show/hide your repeating section. You can use this same principle to show/hide repeating tables.
Good luck!
nkstrou
An imprecisely defined requirement has an infinite number of possible solutions. Unfortunately, only about a maxiumum of 3 solutions are actually satisfactory to the end user.