0

I have some data I want to fill in when my form opens, so I created an XML-file-based secondary data connection (it has to be a secondary connection, not the primary) with some sample values with the intent of later removing them and replacing them with real values. It basically looks like this:

<root>
    <entry>
        fields here
    </entry>
    <entry>
        fields here
    </entry>
</root>

(The second entry is so that InfoPath knows it has repeating values.)

I then bound <entry> to a repeating table in my form.

But when I open the form, there are exactly two values, and the options to allow adding/removing entries are greyed out. InfoPath knows that this is a repeating element, otherwise I wouldn't be able to bind it to a repeating table.

How can I change this to allow adding and removing entries?

Chris
  • 3,400
  • 1
  • 27
  • 41
  • See if this helps at all http://www.infopathdev.com/blogs/hilary/archive/2009/03/13/locked-schema-got-you-down.aspx – Dave Williams Oct 18 '13 at 01:43
  • An interesting idea, but that example is using a primary data source. Tried it anyway for my secondary, but it didn't work. Thanks anyway. – Chris Oct 18 '13 at 17:44
  • Do you want to actually add/remove from the secondary data source or only read in and then add/remove on the main data source copy? – Dave Williams Oct 18 '13 at 21:49

1 Answers1

0

Apparently, secondary data sources cannot be modified. I found this information in the InfoPath help.

Modifying secondary data sources

Because the fields and groups in secondary data sources are based on data connections to external data sources, you cannot modify the fields and groups in a secondary data source. When you view a secondary data source in the Data Source task pane, the fields have the locked field icon and the groups have the locked group icon to indicate that you cannot modify them.

Chris
  • 3,400
  • 1
  • 27
  • 41