Submit Repeating Table to Sharepoint List - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Submit Repeating Table to Sharepoint List

Last post 10-01-2010 01:47 AM by JoanneWellings. 11 replies.
Page 1 of 1 (12 items)
Sort Posts: Previous Next
  • 09-29-2010 01:44 PM

    Submit Repeating Table to Sharepoint List

    Hello -

    I hope someone can help with this. I've followed this article to create a connection to a sharepoint list to hold data from a repeating table.

    It seems to work except that I can't work out how to add data from more than one field in a row to the same item in a list.

    At the moment, where the table in infopath is:

    Field 1        Field 2        Field 3

    a                 b               c

     The list comes out like:

    Field 1        Field 2        Field 3

    a

                     b 

                                        c

     What code do I need for it iterate through the fields and add to the same list item?

     TIA

  • 09-29-2010 04:03 PM In reply to

    Re: Submit Repeating Table to Sharepoint List

    Hi Joanne,

    Did you ask S.Y.M. Wong-A-Ton (the author of that arrticle) for some help?  That is her site, not ours.

    However, I think you might find using our qRules product a much better way to accomplish what you need to do.  qRules will accomplish the same results as the article you linked to but I think you will find working with qRules to be much easier to do long term.  qRules also offers over 40 other commands for InfoPath that you might be able to use as well.

    Have you taken a look at qRules yet? http://www.qdabra.com/en/products/qRules.aspx and the demo video for that command is here: http://www.screencast.com/t/NGQ4ZmFlM2Q and blog post here: http://www.infopathdev.com/blogs/hilary/archive/2009/11/16/submit-items-to-a-sharepoint-list-with-qrules-v2-0.aspx.

    We do offer a free trial version so you can test it out yourself.

    Hope that helps!

    Ted

  • 09-30-2010 03:07 AM In reply to

    Re: Submit Repeating Table to Sharepoint List

    Hi Ted - thanks for getting back to me. I've downloaded the trial of qRule 2.3, and I've gone through the walkthrough that Hilary wrote, but I still can't get it to work.

    It says that it has submitted successfully but nothing appears in the library. It all seems to be working fine until I actually submit it.

    The error field has nothing in it. The ID field doesn't seem to populate itself either - have I missed something out there? The field is set to be a text field.

    Any help you could give would really be appreciated, the deadline for this project is getting very close! Many thanks

  • 09-30-2010 06:59 AM In reply to

    Re: Submit Repeating Table to Sharepoint List

    The above is when I am trying to use it on an existing form. When i go through the actual example from the walkthrough, it doesn't work either. The error is "The specified data connection is not present". Any ideas why this is happening?

     

  • 09-30-2010 09:30 AM In reply to

    Re: Submit Repeating Table to Sharepoint List

    Hi Joanne,

    Can you attach your sample template so we can take a quick look?

    Thanks

    Ted

  • 09-30-2010 10:05 AM In reply to

    Re: Submit Repeating Table to Sharepoint List

    This error occurs if you use a data source name for the /mapping or the /submit connection that is not present in your form. Make sure that the name you use for those parameters is the same as the name you used when you created the data connections in your form -- you may have named them something different than what I did in the walkthrough.
    Hilary Stoupa

  • 09-30-2010 01:32 PM In reply to

    Hi -

     Thanks again for getting back to me.

    I've attached the template and below is the xml that was generated by qRules.

    The view is called 7 - Employee Relations. I have added a section at the bottom to see if any errors were being returned.

    I'll go through the example walkthrough again when I get a chance, but at least that's returning an error, whereas the attached doesn't return anything.

    I've been tinkering with it so much there's probably quite a bit wrong with it now!

    Thanks for all your help

     

     <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-gb">
      <my:Mappings>
        <my:IsRepeating>true</my:IsRepeating>
        <my:RepeatingGroup>my:myFields/my:group5/my:group6/my:group7</my:RepeatingGroup>
        <my:Mapping>
          <my:FormField my:IsRichText="false">my:Leaver_Name</my:FormField>
          <my:SharePointColumn>Title</my:SharePointColumn>
        </my:Mapping>
        <my:Mapping>
          <my:FormField my:IsRichText="false">my:Experience_or_Observation</my:FormField>
          <my:SharePointColumn>Experience_x0020_or_x0020_Observ</my:SharePointColumn>
        </my:Mapping>
        <my:Mapping>
          <my:FormField my:IsRichText="false">my:Type_of_Experience</my:FormField>
          <my:SharePointColumn>Type_x0020_of_x0020_Experience</my:SharePointColumn>
        </my:Mapping>
      </my:Mappings>
      <my:SharePointListURL>http://bw010c04n01:22687/sites/welcome/HR</my:SharePointListURL>
      <my:ListCollection>{E475AF90-A25D-483A-805F-0EAF075FE5FE}</my:ListCollection>
      <my:FullListURL>http://bw010c04n01:22687/sites/welcome/HR/Lists/Leavers Form - Bullying</my:FullListURL>
      <Batch OnError="Continue">
        <Method ID="1" Cmd="New">
          <Field Name="Title" />
          <Field Name="Experience_x0020_or_x0020_Observ" />
          <Field Name="Type_x0020_of_x0020_Experience" />
        </Method>
      </Batch>
    </my:myFields>

     

  • 09-30-2010 02:04 PM In reply to

    Re: Submit Repeating Table to Sharepoint List

    Your form has code in it. Is that intentional? If you need to have qRules + custom code in your form, there is a way to do that, but I wanted to check first.
    Hilary Stoupa

  • 09-30-2010 02:11 PM In reply to

    Re: Submit Repeating Table to Sharepoint List

    That code was from when I was trying to do this myself. The procedure shouldn't be called by anything at the moment unless you click the Submit button on another form, which I wasn't using. Would that still affect anything?

  • 09-30-2010 02:14 PM In reply to

    Re: Submit Repeating Table to Sharepoint List

    Well, currently, your form is using your code dll, not the qrules dll.

    So, if you preview your form and try ANY qrules command, I'd expect it to fail. That's what happens for me -- qRules isn't working at all in this form. When I preview and try a simple command like GenerateGuid, nothing happens at all.

    Hilary Stoupa

  • 09-30-2010 02:23 PM In reply to

    Re: Submit Repeating Table to Sharepoint List

    Also, I see that your command is:

    SubmitToSharePointList /submit=WebServiceSubmit /mapping=mapping /id=my:id

    But your mapping data connection is named mapping v8, not mapping. I didn't have time to look through your entire main data source for your form, but do you have field named "id" in it? Because the field for the /id parameter needs to actually be in your main data source....

    So, you should re-inject your form with qRules. Try a simple qRules command to make sure it is working properly.

    Then, make sure your /id parameter points to an actual field in your form in group7, which is the repeating group you've mapped.

    Change your command to use the actual mapping data source name from your form, and the actual id field from your form.

    Also, perhaps try this on a plain old button -- I haven't tried using a qRules command as a submit rule. Our test team may have, but I don't want to recommend anything I haven't tried myself....

    Hilary Stoupa

  • 10-01-2010 01:47 AM In reply to

    Re: Submit Repeating Table to Sharepoint List

    It's working! Thank you!

     I removed the code altogether, that seems to have been the problem.

    I've gone back to an eaerlier, cleaner version of the form before I started messing around with this and just took the code out.

    Thank you both so much for your help. It's really appreciated. Hopefully I won't have to come back to you!

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