InfoPath 'Control cannot repeat here' message

Learn why InfoPath displays the message 'Control cannot repeat here' and how you can get the rid of that message if you want to display and not store data in a repeating table on an InfoPath form.

Repeating tables in InfoPath must be bound to repeating group nodes in a data source - either the Main or a secondary data source. This also means that any controls you place within a repeating table must be bound to a field that is located under the repeating group node that is bound to that repeating table.

Failure to do so will result in InfoPath displaying the message Control cannot repeat here on any "foreign" control you place within the repeating table.

In some situations, you may not be able to add an extra field under the repeating group node that is bound to a repeating table, for example because the XML schema of the form is locked or because you are not allowed to alter the data source of the form for one reason or another.

In those cases, if all you want to do is display data and not store it within the form itself, you could make use of a Calculated Value control to display the data within a repeating table without getting the Control cannot repeat here message.

The InfoPath video shown below shows you how you can take data from a secondary data source, relate it to a field that is present in a repeating table, and then display related data from the secondary data source inside of the repeating table.

In this InfoPath 2010 tutorial video, you learned...

  • Why the message Control cannot repeat here appears when you place a field within a repeating table.
  • How you can avoid getting the Control cannot repeat here message in a repeating table if all you want to do is display and not store data in the repeating table.
  • How to bind a Calculated Value control to a field in a secondary data source for display within a repeating table.

See more InfoPath 2010 tutorial videos »

 
 Subscribe for updates via RSS or Email

Copyright: This article may not be used on web sites (whether personal or otherwise), copied, disseminated, altered, printed, published, broadcasted, or reproduced in any way without an expressed written consent of S.Y.M. Wong-A-Ton. The techniques demonstrated in this article may be used within any Microsoft InfoPath project. This article is provided without any warranties. Copyright for this article is non-transferrable and remains with the author, S.Y.M. Wong-A-Ton.

InfoPath 2013 Cookbook: 121 Codeless Recipes for Beginners
InfoPath 2013 Cookbook 2: 121 Codeless Recipes for SharePoint 2013
InfoPath 2010 Cookbook: 101 Codeless Recipes for Beginners
InfoPath 2010 Cookbook 2: 101 Codeless Recipes for SharePoint 2010
InfoPath 2010 Cookbook 3: 101 Code Recipes for C# Developers
InfoPath 2010 Cookbook 5: Integrating InfoPath with Excel and Excel Services


Related InfoPath Articles:

InfoPath 2013 Cookbook: 121 Codeless Recipes for Beginners

InfoPath 2013 Cookbook 2: 121 Codeless Recipes for SharePoint 2013

InfoPath 2010 Cookbook: 101 Codeless Recipes for Beginners

InfoPath 2010 Cookbook 2: 101 Codeless Recipes for SharePoint 2010

InfoPath 2010 Cookbook 3: 101 Code Recipes for C# Developers

InfoPath 2010 Cookbook 4: 101 Code Recipes for VB Developers

InfoPath 2010 Cookbook 5: Integrating InfoPath with Excel and Excel Services