locked
Problem Submitting to SharePoint using CAML RRS feed

  • Question

  • Hi, I started SharePoint/InfoPath developing in December 2010. So "longtime" reader, first post.

     

    Software: InfoPath 2010, SharePoint 2007

    Problem: I have a repeating table in my InfoPath form that must be transferred to an Excel Document. This is a project requirement.

    My Solution: Submit data from InfoPath to a SharePoint list, then read that list in Excel with the built-in functionality.

    My Progress: I have enabled "Personal Features ". Then I completed the tutorial "Submitting to a SharePoint List ". My demo program is not giving any errors on submit, although the data is not being added to the SharePoint list.

     

    My reasoning for going from "IP -> SP -> Excel' is because my boss did something similar to this without using Web Services. I couldn't care less. Any direction would be helpful. Thanks

    -George

     

    Monday, February 7, 2011 8:58 PM

Answers

  • I think if you change "Continue" to "Return" in the OnError attribute, it will throw an error if there is a problem instead of just ignoring it.

    Some things to look at.

    • The field names are case sensitive.  Make sure they EXACTLY match the fields in your list.
    • I always use single quotes around my values, but i don't know if that matters.
    • One thing they never mention is that when specifying the lists.asmx location in step 6.1 You need to use the full path to the site. (http://servername/sites/site/site/_vti_bin/lists.asmx).
    • Verify that 6.4 and 6.5 are correct.

    You may want to take a look at the U2U CAML Query Builder.  It takes a lot of the guesswork out of it.  Look for version 3.1.0.0.  they removed the update list functionality from later versions.

    Hope this helps

    Ed

    • Marked as answer by George.H12 Tuesday, February 8, 2011 6:14 PM
    Tuesday, February 8, 2011 5:46 PM

All replies

  • Can you please post your CAML file and the code you are using to write to it.

    Ed

    Tuesday, February 8, 2011 4:17 PM
  • CAML:

    <?xml version="1.0" encoding="UTF-8"?>
    <Batch OnError="Continue">
      <Method ID="1" Cmd="New">
        <Field Name='Title'></Field>
        <Field Name="FirstName"></Field>
        <Field Name="LastName"></Field>
        <Field Name="Email"></Field>
        <Field Name="Phone"></Field>
      </Method>
    </Batch>
    

    I tried to do a tutorial that didn't require code. I have some screenshots of my setup, but they are pretty much the same as the ones in the tutorial.

     

    I want to add that I was able to receive data using lists.asmx but not submit data.

    Tuesday, February 8, 2011 5:22 PM
  • I think if you change "Continue" to "Return" in the OnError attribute, it will throw an error if there is a problem instead of just ignoring it.

    Some things to look at.

    • The field names are case sensitive.  Make sure they EXACTLY match the fields in your list.
    • I always use single quotes around my values, but i don't know if that matters.
    • One thing they never mention is that when specifying the lists.asmx location in step 6.1 You need to use the full path to the site. (http://servername/sites/site/site/_vti_bin/lists.asmx).
    • Verify that 6.4 and 6.5 are correct.

    You may want to take a look at the U2U CAML Query Builder.  It takes a lot of the guesswork out of it.  Look for version 3.1.0.0.  they removed the update list functionality from later versions.

    Hope this helps

    Ed

    • Marked as answer by George.H12 Tuesday, February 8, 2011 6:14 PM
    Tuesday, February 8, 2011 5:46 PM
  • That was the problem. After all of the pages I looked at for help, no one was nearly as clueless as me. Thanks Ed!
    Tuesday, February 8, 2011 6:17 PM