Hiding a Repeating Section

W

Wenster

I have a repeating section (the section consists of a table with 8 rows that
I need to repeat). I want the section to appear ONLY when a specific Option
is selected from a different field. I've programmed the repeating section
with the following:

If Option button 1 = 1, hide the control (the repeating section)

The hiding works for the actual control, but it does not hide the insert
button and hint text for the section.

I tried embedding the repeating section inside a regular section and
applying the hide rule to the regular section. When I tried this, the
repeating section would not appear, but again, the insert button and hint
text appeared.

Can anyone help?
 
A

Anuma(GGK Tech)

Hi,

I think you used Optional section instead of "Section". Use normal section
and try it once.
 
W

Wenster

I went back to the form to confirm this - I did not use an Optional Section
- it was definitely a normal section.

Any ideas why this is happening?
 
E

Ed Thurber

Not sure why u are getting this result. I tried your second solution and it
works.

Here is my test data set

myFields
|-Section (Group)
|-HideMe (Boolean)
|-RepeatingSection (Repeating Group)
|-Element1 (string)
|-Element2 (string)

I added a Section bound to "Section"
inside the Section I added a Repeating Section bound to "Repeating Section"
below Section (outside of) I added a checkbox bound to "HideMe"
added conditional formatting to Section (not Repeating Section) to hide if
HideMe=TRUE

Checking "HideMe" hides everything.
Unchecking it restores to normal.

Are you doing something diff?

Ed
 
W

Wenster

I'm a bit of a novice here, so I'm not sure if I completely understand your
example. But I think that I do : ) and I think that's how I have the form
set up.

The section does hide, however, the directional text doesn't hide.

Here's what I have:

myFields
|-Repeating Group Section
|-Option Control
|-Group
|-Repeating Group Section (on this group, i placed conditional
formatting to say Hide me if X value is selected in the Option Control above)
|-Text control1
|-Text control2

Hope this makes sense.
 
A

Anuma(GGK Tech)

Hi,

I think you added condition for repeating group instead of a Group.

Directional text means are you showing any text in the form. If this is
correct, move that text to inside the "Group(section)".
 
W

Wenster

The text is the text that Infopath automatically adds into your form when you
insert a repeating section. The options for it are under the properties for
the section, under the Data tab. It's a check box that says: Show insert
button and hint text. Then there is a blank field where you can input text
that the user will see and that allows them to enter another of the same
section.
 
E

Ed Thurber

your data source looks right the only thing to change is where your
conditional formatting is applied. Move it to Section control that is bound
to "Group". I would also move "Option Control" into "Group" as it makes the
rules easier to apply. you still want to place the actual control
(checkbox) outside the section control on your form (or else it will
disappear when the "Group" section control is hidden).

one thing to remember, conditional formatting on repeating controls
(repeating sections, repeating tables) only affects the line items. it does
not affect the control itself. what you did was to create a rule that did
not apply to a line item ("Option Control" was not within the "Repeating
Group Section"). Because of this it applied to all of the line items (but,
again, not the repeating section control).

The "Add" link is part of the control and so it is not hidden when the
conditional formatting is applied.

when repeating elements are added by the user, they are added like this;

Group
|-Repeating_Element -Repeating_Element -Repeating_Element -...
|-element1 |-element1 |-element1
|-element2 |-element 2 |-element
2

your repeating control is bound to the repeating element as a whole, but
repeats for each instance (sibling). the conditional formatting only
controls the visibility of the instances.

Hope this helps.

ed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top