March 2009 - Posts - Ernesto Machado
in

InfoPath Dev

Ernesto Machado

March 2009 - Posts

  • "Save As" in the DBXL Administration Tool (DAT)

    If you edit an existing Document Type in DBXL you’ll see a button labeled Save As in the header. This is an easy way to create a duplicate of your configuration, but under a different name.

    Why is this useful? Here are two possible scenarios:

    • Database mapping: Because this action copies the Database mappings, this is useful if you wish to avoid recreating a large mapping to SQL. This also allows you to create the same mapping but to a new database or SQL instance, by replacing the Connection String.
    • Development and Testing: Save As allows you to create a test DocType. You can edit the InfoPath form, create test documents, edit the SharePoint or Database mappings, or alter Permissions. Once you have tested, you can edit your original DocType to apply whatever changes you wish to implement. This way, you avoided altering your main Document Type (which might be in use by users in a Production environment). 

    These are but two scenarios where the Save As button might prove useful.

  • 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.

Copyright © 2003-2010 Qdabra Software. All rights reserved.
View our Terms of Use.