May 2009 - Posts - Jo-Anne Alfafara
in

InfoPath Dev

Jo-Anne Alfafara

May 2009 - Posts

  • How to report shredding errors to form users

    As a DBXL user, you might encounter an error when submitting your form to a SQL database. Normally, the error returned by an InfoPath form will not give you the information you need, such as a detailed error explaining why a submit process failed. In order to help you identify these errors, you can use DBXL’s “Report Shredding Errors to the Form User” function which can be found in the DBXL Administration Tool’s Database tab, as you can see in the screenshot below:

    To use this function, your form should have a data connection that uses the DBXLDocumentServiceEx Web Service. If you are a new DBXL user and you want to report database errors to users, you can follow the steps below when creating your submit data connection. Otherwise, if you already have an existing form, you have to modify the submit data connection in your form to conform to the following set up:

    SET YOUR FORM TO USE DBXLDOCUMENTSERVICEEX

    1. Configure a Submit button to use the DBXLDocumentServiceEx web service.
       a.   Double click on your Submit button to display properties.
       b.   Click on Submit Options.
       c.   Select Web Service from the first dropdown.
       d.   Click the Add button.
       e.   Type in the location of the Qdabra DBXLDocumentServiceEx Web Service in the format http://<servername>/QdabraWebService/DbxlDocumentServiceEx.asmx. 


       f.   Click Next. InfoPath will contact the server.
       g.   In the list of web method operations, choose the web method to use for submitting the form, which is called SubmitDocument. 

       h.   Click Next.

    2. Configure the parameters.
       a.   Ignore the first parameter, called tns:docTypeName. It will default to the DocType of the form.
       b.   Select the second parameter, named tns:xml.                                                             
              i.  Under Parameter options select the Entire form (XML document, including processing instructions) radio button.                                                           
              ii. Check the Submit data as a string checkbox.

        c.   Select the tns:name parameter.                                                              
              i.    Select the radio button Field or Group in the Parameter options section.
              ii.   Click the button next to the Field or Group text box. The Select a Field or Group dialog will appear.
              iii.   Select the expenseReport/employee/name field and click OK.

       d.   Select the tns:author parameter                                                             
              i.    Select the radio button Field or Group in the Parameter options section
              ii.   Click the button next to the Field or Group text box. The Select a Field or Group dialog will appear.
              iii.   Select the expenseReport/employee/emailAddress node and click OK.

       e.   Select the tns:description parameter.                                                              
              i.    Select the radio button Field or Group in the Parameter options section
              ii.   Click the button next to the Field or Group text box. The Select a Field or Group dialog will appear.
              iii.   Select the expenseReport/purpose node and click OK.

       f.   Click Next. Click Finish.

    3. Save your form.

     

    CONFIGURE DAT TO USE THE NEW FORM AND CREATE A DATABASE MAPPING

    1. In DAT, attach the form as a DocType. 2. Click the Save button in DAT. 3. Go to the Database tab and make sure the Report Shredding Errors to Form User check box is selected. If not, select it.

    2. Create a database mapping. For more information on how to create a mapping to your SQL database, you can read DBXL’s Getting Started document or download this document. NOTE: If you already have an existing DocType mapped to a SQL database, you may skip this step.

     

    TEST YOUR FORM

    For the purpose of this document, we need to change our SQL table design to incite an error. We removed the Identity Key from the SampleTable.

    1. Click on the Documents tab.

    2. Click the New link to create a new document.

    3. Fill out the form and submit.  You will receive an error message stating the details why database shredding failed. In this case, we received the exact error pertaining to the id column which used to be an identity key.

     

    The ‘Report Shredding Errors to Form User’ function makes error reporting much easier to understand and thus saves you a lot of time with troubleshooting.

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