A Tall Tale About My Field - Greg Collins

InfoPath Dev

This Blog


Greg Collins

A Tall Tale About My Field

I uncovered this problem quite a while ago, but on 2004-09-02 it finally got to me enough, when I needed to actually use a structure like this, to write something about it. I've reported this problem to Microsoft.


There is an problem in InfoPath where the designer thinks fields are invalid when in reality they are not. This only seems to be a problem when you've got a structure similar to that produced when you insert a repeating table into the view: a group with a repeating group inside. It happens when you create a non-repeating section from the repeating group, and then insert another section, from that same group, inside the first. Fields inserted into that inner group appear invalid in the designer when in reality they are not invalid.

Here's the walkthrough to reproduce the problem:

Create the structure to reveal the issue:

  1. Create a new blank form.
  2. Insert a Repeating Table into the view.
  3. In the Data Source task pane, right-click on group2, choose More, choose Section, and then click OK.
  4. Insert field1 and field2 into the new Section.
  5. Insert group2 as a Section into the existing section.
  6. Insert field3 into the inner Section.

    Note that Field 3 has a red exclamation point with a tooltip that says, “field3 (Control cannot store data correctly)

Test the form to verify the issue:

  1. Click Preview Form.
  2. Enter test data into the Repeating Table fields and the Section field to verify they all work.

    There’s no problem storing data in field3.
  3. Close the preview.

Examine the XSL:

  1. Extract the form files to a temporary folder.
  2. Open the view1.xsl file
  3. Search for “_1”.

    You’ll see that the xsl:apply-templates and xsl:template are both correct.
  4. Search for “_2”.

    You’ll see that the xsl:apply-templates and xsl:template are both correct.
  5. Close the view1.xsl file.

The problem seems to be that InfoPath is incorrectly identifying this structure as having invalid fields when they are not.

You’ll find that if you try to close InfoPath you will get an error message stating, “The form includes a control with an error. Data entered into the control will note be stored. Do you still want to close the form?” Click Yes. The form will reopen just fine (with the supposed error still in it), and you can create and use the forms just fine.


Currently I do not know of a workaround other than to just try to avoid this sturcture where possible, or to deal with the annoyance of having to click Yes every time you close the form.

©2004 Greg Collins. All rights reserved. Licensed to Autonomy Systems, LLC for display on InfoPathDev.com.


No Comments
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.