InfoPath Button Click ->Hide a control bound to secondary data source

Techsavy used Ask the Experts™
I have a form where I have a repeating table bound to secondary data source. I would like to hide this repeating table, when a button is clicked and then show when the same button is clicked again.

Note: The repeating table is not bound to main data source.

Please help...
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Director of Business Integration
This is no problem.

First you need to put your repeating table within a non-repeating section.  Just add a section to the form and take out any whitespace so it just is a container for the repeating table.

Create a boolean field that will store the toggle of the section showtable or something and set the default false.
Add your rule or conditional formatting to the section where showtable is false hide the section.

Then add a rule to your button that if showtable is false sets showtable to true. Another rule with condition if showtable is true, set showtable to false

That is your toggle button.  Sometimes I make a + button and a minus - button which do the same things but the buttons hide after they are pushed to make it look like a dynamic button.


Hi clayfox,

I tried the toggle option and I am getting :

Some rules were not applied -> Unspecified error.

What am I missing?

Clay FoxDirector of Business Integration

not sure what you have going on.But conditional formating would not produce those kind of errors.  I would look at other rules and maybe disable or remove some and test and keep adding them back till you know which one is causing the issue.


When will the button rule execute? When it is clicked? Because..I have set a rule in the button where I used an action to set a field value. But it is not doing that.


was well explained and worked totally after a couple of attempts.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial