SubmitToSharepoint list ID - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

SubmitToSharepoint list ID

Last post 08-21-2013 05:32 AM by ErnestoM. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 08-20-2013 05:22 AM

    SubmitToSharepoint list ID

     Hi

    I submit repeating data to a single list. I use ShPId a Invoicenumber and it works great for repeating data, but not in the first row for a new submit - see attached image.

    My mapping file looks like this:

    <?xml version="1.0" encoding="utf-16"?>
    <myFields lang="da">
      <Mappings mappingName="Bestillinger">
        <ListCollection useName="false" ListName="Bestillinger">{53647A15-7F52-4CA4-80A3-19554D4875A1}</ListCollection>
        <IsRepeating>false</IsRepeating>
        <RepeatingGroup />
        <Relationships>
          <RelatedList />
          <RelatedListId />
        </Relationships>
        <Mapping>
          <FormField IsRichText="false" IsId="true" IsAttachment="false">my:mineFelter/my:ShpId</FormField>
          <SharePointColumn />
        </Mapping>
        <Mapping>
          <FormField IsRichText="false" IsId="false" IsAttachment="false">my:mineFelter/my:Bruger</FormField>
          <SharePointColumn>Client</SharePointColumn>
        </Mapping>
        <Mapping>
          <FormField IsRichText="false" IsId="false" IsAttachment="false">my:mineFelter/my:Leveringsdato</FormField>
          <SharePointColumn>Leveringsdato</SharePointColumn>
        </Mapping>
        <Mapping>
          <FormField IsRichText="false" IsId="false" IsAttachment="false">my:mineFelter/my:Ordrenummer</FormField>
          <SharePointColumn>E_x002d_mail</SharePointColumn>
        </Mapping>
        <Mapping>
          <FormField IsRichText="false" IsId="false" IsAttachment="false">my:mineFelter/my:SumExlMoms</FormField>
          <SharePointColumn>Adress</SharePointColumn>
        </Mapping>
        <Batch OnError="Continue">
          <Method ID="1" Cmd="New">
            <Field Name="Client" />
            <Field Name="Leveringsdato" />
            <Field Name="E_x002d_mail" />
            <Field Name="Adress" />
          </Method>
        </Batch>
      </Mappings>
      <Mappings mappingName="Diverse">
        <ListCollection useName="false" ListName="Bestillinger">{53647A15-7F52-4CA4-80A3-19554D4875A1}</ListCollection>
        <IsRepeating>true</IsRepeating>
        <RepeatingGroup>my:mineFelter/my:group7/my:group8</RepeatingGroup>
        <Relationships>
          <RelatedList />
          <RelatedListId />
        </Relationships>
        <Mapping>
          <FormField IsRichText="false" IsId="false" IsAttachment="false">my:text</FormField>
          <SharePointColumn>Description</SharePointColumn>
        </Mapping>
        <Mapping>
          <FormField IsRichText="false" IsId="false" IsAttachment="false">my:field13</FormField>
          <SharePointColumn>Price</SharePointColumn>
        </Mapping>
        <Mapping>
          <FormField IsRichText="false" IsId="false" IsAttachment="false">my:field14</FormField>
          <SharePointColumn>Quantity</SharePointColumn>
        </Mapping>
        <Mapping>
          <FormField IsRichText="false" IsId="false" IsAttachment="false">../../my:ShpId</FormField>
          <SharePointColumn>Invoice_x0020_Number</SharePointColumn>
        </Mapping>
        <Mapping>
          <FormField IsRichText="false" IsId="false" IsAttachment="false">../../my:Leveringsdato</FormField>
          <SharePointColumn>Leveringsdato</SharePointColumn>
        </Mapping>
        <Mapping>
          <FormField IsRichText="false" IsId="false" IsAttachment="false">../../my:Ordrenummer</FormField>
          <SharePointColumn>E_x002d_mail</SharePointColumn>
        </Mapping>
        <Batch OnError="Continue">
          <Method ID="1" Cmd="New">
            <Field Name="Description" />
            <Field Name="Price" />
            <Field Name="Quantity" />
            <Field Name="Invoice_x0020_Number" />
            <Field Name="Leveringsdato" />
            <Field Name="E_x002d_mail" />
          </Method>
        </Batch>
      </Mappings>
      <Mappings mappingName="Frokost">
        <ListCollection useName="false" ListName="Bestillinger">{53647A15-7F52-4CA4-80A3-19554D4875A1}</ListCollection>
        <IsRepeating>true</IsRepeating>
        <RepeatingGroup>my:mineFelter/my:group11/my:group12</RepeatingGroup>
        <Relationships>
          <RelatedList />
          <RelatedListId />
        </Relationships>
        <Mapping>
          <FormField IsRichText="false" IsId="false" IsAttachment="false">my:field24</FormField>
          <SharePointColumn>Description</SharePointColumn>
        </Mapping>
        <Mapping>
          <FormField IsRichText="false" IsId="false" IsAttachment="false">my:field21</FormField>
          <SharePointColumn>Price</SharePointColumn>
        </Mapping>
        <Mapping>
          <FormField IsRichText="false" IsId="false" IsAttachment="false">my:field22</FormField>
          <SharePointColumn>Quantity</SharePointColumn>
        </Mapping>
        <Mapping>
          <FormField IsRichText="false" IsId="false" IsAttachment="false">../../my:ShpId</FormField>
          <SharePointColumn>Invoice_x0020_Number</SharePointColumn>
        </Mapping>
        <Mapping>
          <FormField IsRichText="false" IsId="false" IsAttachment="false">../../my:Leveringsdato</FormField>
          <SharePointColumn>Leveringsdato</SharePointColumn>
        </Mapping>
        <Mapping>
          <FormField IsRichText="false" IsId="false" IsAttachment="false">../../my:Ordrenummer</FormField>
          <SharePointColumn>E_x002d_mail</SharePointColumn>
        </Mapping>
        <Batch OnError="Continue">
          <Method ID="1" Cmd="New">
            <Field Name="Description" />
            <Field Name="Price" />
            <Field Name="Quantity" />
            <Field Name="Invoice_x0020_Number" />
            <Field Name="Leveringsdato" />
            <Field Name="E_x002d_mail" />
          </Method>
        </Batch>
      </Mappings>
      <SharePointListURL>https://studienet2dev.viauc.dk/kantinedemo</SharePointListURL>
    </myFields>

     

    What went wrong??

    Thanks in advance.
    /Michael


  • 08-20-2013 05:51 AM In reply to

    Re: SubmitToSharepoint list ID

    Hi Michael,

    Thanks for including the mapping file. From it, I understand that you're mapping three separate paths from your form into the same list. Is this correct?

    For all three mappings in the mapping file, the list name is Bestillinger and the Guid is 53647A15-7F52-4CA4-80A3-19554D4875A1.

    The first mapping does not map repeating data.

    The second mapping maps repeating data from my:mineFelter/my:group7/my:group8

    The third mapping maps repeating data from my:mineFelter/my:group11/my:group12

    The client column is being mapped from my:mineFelter/my:Bruger (non repeating) so that's the source of the first SharePoint list item in your screenshot.

    Am I understanding correctly so far? Can you explain why map from a non repeating and from two repeating groups into the same list? I want to make sure I understand the scenario.

    Thank you.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 08-20-2013 06:02 AM In reply to

    Re: SubmitToSharepoint list ID

     Hi Ernesto

    Yes, you´re correct. The form is a catering order form and I want the first row for each submission to contain userdata etc. and under that the orders:
    I have tried out Hillarys workaround with the Nortwind database, but have not found a way to match 'order' and 'order details' from a user point of view
    So my idea ís to put all data in one list - maybe it´s a bad idea?

    Kind Regards

    Michael

  • 08-20-2013 06:16 AM In reply to

    Re: SubmitToSharepoint list ID

    I think it would be simple to apply the same Client ("jens") to the 4 InvoiceNumbers in the screenshot. That way the data becomes "flat".

    The second and third mappings would need a new entry like this:

    <Mapping>
          <FormField IsRichText="false" IsId="false" IsAttachment="false">../../my:Bruger</FormField>
          <SharePointColumn>Client</SharePointColumn>
        </Mapping>

    That way the client (my:Bruger) is inserted into all the 4 invoices. Does that make sense?

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 08-21-2013 12:42 AM In reply to

    Re: SubmitToSharepoint list ID

     Ok, but then i´ll miss the unique number - the client field is just a name.
    Will to lists (like Orders and Order details) be a better solution?

    /Michael

  • 08-21-2013 05:32 AM In reply to

    Re: SubmitToSharepoint list ID

    Yes, in that case, it seems two lists will be better, so you can have a mapping to Orders followed by a mapping to OrderDetails.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


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