Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have an InfoPath 2010 form template where two views have a repeating table. The repeating table has formatting rules applied so that it will hide if another field is at its default value.

I've tried enclosing the repeating table in a section and hiding the section, but that also fails, though the technique works fine for other controls on the same form.

Unfortunately, the rules do not seem to work. The repeating table is always visible. Has anyone else ever encountered this? If so, is there a fix to make the rules work?

EDIT

I don't have enough reputation on this site to post screen shots from InfoPath. But I'll attempt some text graphics:

This is the field/group set I pulled onto the template. InfoPath constructed a section holding a repeating table. I've edited the table contents to place the Attach_File_Panel section (with the File's file attachment control) and the Attachment URL into the first detail cell of the table. The AttachmentTitle has its textbox placed into the second detail cell of the table. The FileID is hidden and extra columns removed from the table.

Attachments (group)
└─ Attachment (group)
   ├─ Attach_File_Panel (group)
   │  └─ File (field - base64Binary)
   ├─ AttachmentURL (field - anyURI)
   ├─ AttachmentTitle (field - string)
   └─ FileID (field - integer)

I placed two formatting rules on the "Attachments" section and the same rules on the "Attachment" Repeating Table. The first rule checks the value of another field "SIPP" for a default value. The second rule tests whether the SIPP field is blank. In either case the section or repeating table should be hidden. (I check the "Hide this control" checkbox for the rule.)

The SIPP field's default value is

;#1;#tbExport Controlled Information (ECI);#;#00000000-0000-0000-0000-000000000000;#;#1;#tbThird Party Proprietary Information;#;#00000000-0000-0000-0000-000000000000;#;#1;#tbOrganizational Conflict of Interest (OCI);#;#00000000-0000-0000-0000-000000000000;#;#2;#Other;#;#00000000-0000-0000-0000-000000000000;#;#;#

I'm wondering if the complex value is messing up InfoPath's x-path rule engine.

share|improve this question
    
Mind posting how you're trying to hide it presently? –  RJ Cuthbertson Nov 20 '12 at 21:21
    
Could you post this question in infopathdev.com having attached your XSN template there to your question? –  Gennady Vanin Novosibirsk Nov 21 '12 at 5:51
add comment

1 Answer 1

up vote 1 down vote accepted

Problem solved: The issue is that the value I was pasting into the rule dialog box was too long and InfoPath silently truncated the value. Switching from a simple field comparison to "The expression ..." and replacing the truncated value with the full value fixed the problem.

In the future, if pasting (or typing) long strings into an InfoPath rule, using "The expression" allows for much longer strings than choosing a field, a comparison operation, and a value.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.