SubmitToSharePointList - Repeating Table and Additional Fields - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

SubmitToSharePointList - Repeating Table and Additional Fields

Last post 07-06-2011 09:15 AM by Hilary Stoupa. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 07-03-2011 08:12 PM

    SubmitToSharePointList - Repeating Table and Additional Fields

    I have a form with 11 fields in a repeating table.  There are also 6 "header" fields that apply to each of the rows in the repeating table.  This form is client based, created in InfoPath 2010, but saved to work with InfoPath 2007.  The intention is that field personnel use it to do inventory in the field where they won't have internet access.   I am using custom code for a Save (Save As functionality that auto-generates the filename) button on the form so that they can save each form to their hard drive for upload once they have an internet connection.  I am using qRules (trial version downloaded on 7/3/2011) for the submission to the SharePoint list.  I've followed the instructions on what code to add when using qRules and custom code, per the instructional document made available via a link from one of the included free trial docs.  When the form is submitted to the SharePoint list, I need the 6 "header" fields to apply to each row within the repeating table.  Is this possible?  Currently when I click on the submit button, I am asked to login to the SharePoint site then nothing...no error message or message of any sort.  Below is the mapping.xml.  Note that I have replaced the SharePoint List URL for privacy purposes. 


    <?xml version="1.0"?>
    -<my:myFields xml:lang="en-us"
     xmlns:xd="http://schemas.microsoft.com/office/infopath/2003" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-11-27T15:29:00" xmlns:xdServerInfo="http://schemas.microsoft.com/office/infopath/2009/xslt/ServerInfo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     -<my:Mappings>
    <my:IsRepeating>true</my:IsRepeating>
    <my:RepeatingGroup>my:myFields</my:RepeatingGroup>
    -<my:Mapping>
    <my:FormField my:IsRichText="false">my:Title</my:FormField> <my:SharePointColumn>Title</my:SharePointColumn>
    </my:Mapping>
    -<my:Mapping>
    <my:FormField my:IsRichText="false">my:InspectionDate</my:FormField> <my:SharePointColumn>InspectionDate</my:SharePointColumn>
    </my:Mapping>
    -<my:Mapping>
    <my:FormField my:IsRichText="false">my:SSC</my:FormField> <my:SharePointColumn>SSC</my:SharePointColumn>
    </my:Mapping>
    -<my:Mapping>
    <my:FormField my:IsRichText="false">my:Fac_ID</my:FormField> <my:SharePointColumn>Fac_ID</my:SharePointColumn>
    </my:Mapping>
    -<my:Mapping>
    <my:FormField my:IsRichText="false">my:Facility</my:FormField> <my:SharePointColumn>Facility</my:SharePointColumn>
    </my:Mapping>
    -<my:Mapping>
    <my:FormField my:IsRichText="false">my:Room</my:FormField> <my:SharePointColumn>Room</my:SharePointColumn>
    </my:Mapping>
    -<my:Mapping>
    <my:FormField my:IsRichText="false">my:Inspector</my:FormField> <my:SharePointColumn>Inspector</my:SharePointColumn>
    </my:Mapping>
    -<my:Mapping>
    <my:FormField my:IsRichText="false">my:Inventory/my:InventoryFields/my:HazardousMaterial</my:FormField> <my:SharePointColumn>HazardousMaterial</my:SharePointColumn>
    </my:Mapping>
    -<my:Mapping>
    <my:FormField my:IsRichText="false">my:Inventory/my:InventoryFields/my:Manufacturer</my:FormField> <my:SharePointColumn>Manufacturer</my:SharePointColumn>
    </my:Mapping>
    -<my:Mapping>
    <my:FormField my:IsRichText="false">my:Inventory/my:InventoryFields/my:ProductUse</my:FormField> <my:SharePointColumn>ProductUse</my:SharePointColumn>
    </my:Mapping>
    -<my:Mapping>
    <my:FormField my:IsRichText="false">my:Inventory/my:InventoryFields/my:Hazards/my:Hazard</my:FormField> <my:SharePointColumn>Hazard</my:SharePointColumn>
    </my:Mapping>
    -<my:Mapping>
    <my:FormField my:IsRichText="false">my:Inventory/my:InventoryFields/my:Packaging</my:FormField> <my:SharePointColumn>Packaging</my:SharePointColumn> </my:Mapping>
    -<my:Mapping>
    <my:FormField my:IsRichText="false">my:Inventory/my:InventoryFields/my:Quantity</my:FormField> <my:SharePointColumn>Quantity</my:SharePointColumn>
    </my:Mapping>
    -<my:Mapping>
    <my:FormField my:IsRichText="false">my:Inventory/my:InventoryFields/my:Volume</my:FormField> <my:SharePointColumn>Volume</my:SharePointColumn>
    </my:Mapping>
    -<my:Mapping>
    <my:FormField my:IsRichText="false">my:Inventory/my:InventoryFields/my:Unit</my:FormField> <my:SharePointColumn>Unit</my:SharePointColumn>
    </my:Mapping>
    -<my:Mapping>
    <my:FormField my:IsRichText="false">my:Inventory/my:InventoryFields/my:StorageRequirementContainer</my:FormField> <my:SharePointColumn>StorageRequirementContainer</my:SharePointColumn>
    </my:Mapping>
    -<my:Mapping>
    <my:FormField my:IsRichText="false">my:Inventory/my:InventoryFields/my:MSDSonFile</my:FormField> <my:SharePointColumn>MSDSonFile</my:SharePointColumn> </my:Mapping>
    -<my:Mapping>
    <my:FormField my:IsRichText="true">my:Inventory/my:InventoryFields/my:Notes</my:FormField> <my:SharePointColumn>Notes</my:SharePointColumn>
    </my:Mapping>
    </my:Mappings>
    <my:SharePointListURL>https://myURL/</my:SharePointListURL> <my:FullListURL>https://myURL/myList</my:FullListURL>
    <ListCollection>{B4C6B24C-55B8-449C-B05B-AB00B964C4C8}</ListCollection>
    -<Batch OnError="Continue">
    -<Method Cmd="New" ID="1">
    <Field Name="Title"/>
    <Field Name="InspectionDate"/>
    <Field Name="SSC"/>
    <Field Name="Fac_ID"/>
    <Field Name="Facility"/>
    <Field Name="Room"/>
    <Field Name="Inspector"/>
    <Field Name="HazardousMaterial"/>
    <Field Name="Manufacturer"/>
    <Field Name="ProductUse"/>
    <Field Name="Hazard"/>
    <Field Name="Packaging"/>
    <Field Name="Quantity"/>
    <Field Name="Volume"/>
    <Field Name="Unit"/>
    <Field Name="StorageRequirementContainer"/>
    <Field Name="MSDSonFile"/>
    <Field Name="Notes"/>
    </Method>
    </Batch>
    </my:myFields>

  • 07-04-2011 08:20 AM In reply to

    Re: SubmitToSharePointList - Repeating Table and Additional Fields

    Hi - your mapping looks odd to me in that myFields has been specified as a repeating group. My guess is that InventoryFields is actually your repeating group - you'd want to map using that, then manually add the relative XPaths to your header fields - more like this:

     <my:IsRepeating>true</my:IsRepeating>
    <my:RepeatingGroup>my:myFields/my:Inventory/my:InventoryFields</my:RepeatingGroup>
    -<my:Mapping>
    <my:FormField my:IsRichText="false">../../my:Title</my:FormField> <my:SharePointColumn>Title</my:SharePointColumn>
    </my:Mapping>
    -<my:Mapping>
    <my:FormField my:IsRichText="false">../../my:InspectionDate</my:FormField> <my:SharePointColumn>InspectionDate</my:SharePointColumn>
    </my:Mapping>
    -<my:Mapping>
    <my:FormField my:IsRichText="false">my:HazardousMaterial</my:FormField> <my:SharePointColumn>HazardousMaterial</my:SharePointColumn>
    </my:Mapping>

    Have you added the QdabraRules data source "Error" node to your form to check for qRules errors? Have you verified that other commands work in your form (i.e. to ensure that your custom code + qRules implementation is working correctly) - I like to drag the whole QdabraRules data source onto my form canvas, preview and type "GenerateGuid" into the Command field - do you get a GUID back in the result field?

    Hilary Stoupa

  • 07-05-2011 06:03 AM In reply to

    Re: SubmitToSharePointList - Repeating Table and Additional Fields

    Hilary, thanks so much for responding so quickly!  I've modified the mapping...see below.  Please confirm that it looks correct.  Yes, I did drag the Error node onto my form and the GenerateGuid command worked.  With the modified mapping, I am now no longer even getting prompted to login to the SharePoint site.  I click the button and nothing happens now.  Should I go back to my original form (before injecting qRules, etc.) and attempt the whole process again?  Any help would be greatly appreciated!  Keefer

    <my:myFields xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xdServerInfo="http://schemas.microsoft.com/office/infopath/2009/xslt/ServerInfo" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-11-27T15:29:00" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003" xml:lang="en-us">
      <my:Mappings>
        <my:IsRepeating>true</my:IsRepeating>
        <my:RepeatingGroup>my:myFields/my:Inventory/my:InventoryFields</my:RepeatingGroup>
        <my:Mapping>
          <my:FormField my:IsRichText="false">my:myFields/my:Title</my:FormField>
          <my:SharePointColumn>Title</my:SharePointColumn>
        </my:Mapping>
        <my:Mapping>
          <my:FormField my:IsRichText="false">my:myFields/my:InspectionDate</my:FormField>
          <my:SharePointColumn>InspectionDate</my:SharePointColumn>
        </my:Mapping>
        <my:Mapping>
          <my:FormField my:IsRichText="false">my:myFields/my:SSC</my:FormField>
          <my:SharePointColumn>SSC</my:SharePointColumn>
        </my:Mapping>
        <my:Mapping>
          <my:FormField my:IsRichText="false">my:myFields/my:Fac_ID</my:FormField>
          <my:SharePointColumn>Fac_ID</my:SharePointColumn>
        </my:Mapping>
        <my:Mapping>
          <my:FormField my:IsRichText="false">my:myFields/my:Facility</my:FormField>
          <my:SharePointColumn>Facility</my:SharePointColumn>
        </my:Mapping>
        <my:Mapping>
          <my:FormField my:IsRichText="false">my:myFields/my:Room</my:FormField>
          <my:SharePointColumn>Room</my:SharePointColumn>
        </my:Mapping>
        <my:Mapping>
          <my:FormField my:IsRichText="false">my:myFields/my:Inspector</my:FormField>
          <my:SharePointColumn>Inspector</my:SharePointColumn>
        </my:Mapping>
        <my:Mapping>
          <my:FormField my:IsRichText="false">my:HazardousMaterial</my:FormField>
          <my:SharePointColumn>HazardousMaterial</my:SharePointColumn>
        </my:Mapping>
        <my:Mapping>
          <my:FormField my:IsRichText="false">my:Manufacturer</my:FormField>
          <my:SharePointColumn>Manufacturer</my:SharePointColumn>
        </my:Mapping>
        <my:Mapping>
          <my:FormField my:IsRichText="false">my:ProductUse</my:FormField>
          <my:SharePointColumn>ProductUse</my:SharePointColumn>
        </my:Mapping>
        <my:Mapping>
          <my:FormField my:IsRichText="false">my:Hazards/my:Hazard</my:FormField>
          <my:SharePointColumn>Hazard</my:SharePointColumn>
        </my:Mapping>
        <my:Mapping>
          <my:FormField my:IsRichText="false">my:Packaging</my:FormField>
          <my:SharePointColumn>Packaging</my:SharePointColumn>
        </my:Mapping>
        <my:Mapping>
          <my:FormField my:IsRichText="false">my:Quantity</my:FormField>
          <my:SharePointColumn>Quantity</my:SharePointColumn>
        </my:Mapping>
        <my:Mapping>
          <my:FormField my:IsRichText="false">my:Volume</my:FormField>
          <my:SharePointColumn>Volume</my:SharePointColumn>
        </my:Mapping>
        <my:Mapping>
          <my:FormField my:IsRichText="false">my:Unit</my:FormField>
          <my:SharePointColumn>Unit</my:SharePointColumn>
        </my:Mapping>
        <my:Mapping>
          <my:FormField my:IsRichText="false">my:StorageRequirementContainer</my:FormField>
          <my:SharePointColumn>StorageRequirementContainer</my:SharePointColumn>
        </my:Mapping>
        <my:Mapping>
          <my:FormField my:IsRichText="false">my:MSDSonFile</my:FormField>
          <my:SharePointColumn>MSDSonFile</my:SharePointColumn>
        </my:Mapping>
        <my:Mapping>
          <my:FormField my:IsRichText="true">my:Notes</my:FormField>
          <my:SharePointColumn>Notes</my:SharePointColumn>
        </my:Mapping>
      </my:Mappings>

  • 07-05-2011 07:59 AM In reply to

    Re: SubmitToSharePointList - Repeating Table and Additional Fields

    Actually, I'd like to look at a copy of your template. You can either attach it using the options tab, or reply to the email I'm about to send you via the forum.

    Hilary Stoupa

  • 07-06-2011 09:15 AM In reply to

    Re: SubmitToSharePointList - Repeating Table and Additional Fields

    Thanks for emailing me your form. The mapping in your form had some issues - I emailed you a corrected version. The mapping posted above also has some issues - Instead of the full XPath to your "header" fields, you need to be using an XPath relative to my:myFields/my:Inventory/my:InventoryFields.

    So, instead of this:

     <my:Mapping>
    <my:FormField my:IsRichText="false">my:myFields/my:Title</my:FormField>
    <my:SharePointColumn>Title</my:SharePointColumn>
    </my:Mapping>

    You'd want this:

     <my:Mapping>
    <my:FormField my:IsRichText="false">../../my:Title</my:FormField>
    <my:SharePointColumn>Title</my:SharePointColumn>
    </my:Mapping>

    Also, in your form it appears that the data connection to the UpdateListItems method doesn't have any parameters set. You'll need to modify that data connection.

    Hilary Stoupa

Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.