When only the first row of a repeating table is committed to SQL database - Ernesto Machado
in

InfoPath Dev

Ernesto Machado

When only the first row of a repeating table is committed to SQL database

While setting up a child table database mapping in DAT (whether in DBXL v2.2 or DBXL v2.3), you might find that only the first row of the repeating table (mapped to the child table) is committed to the child table.

The reason for the problem is an error in mapping. Since it is a very subtle mistake, I wanted to briefly explain via this blog post. The explanation below assumes you have read this document.

This is the data source for the form:

As you can see, we have a repeating group (Contact) inside the group called Contacts.

The parent table is easily mapped, using the fields OwnerName, OwnerPhone and OwnerEmail. The mistake when creating a mapping for the child table is when the user maps the child table to Contacts instead of Contact. When that is done, the columns are mapped as shown below.


Incorrect

The solution is to change the child table mapping to Contact, and then remap the fields, to obtain the mapping shown below.


Correct

The reason for this is simple: the repeating group is Contact and not Contacts. Fix your mapping and you’ll be able to map all of the rows of your child table.

Comments

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