Add Sharepoint List Items with InfoPath - InfoPath Dev
in

InfoPath Dev

Add Sharepoint List Items with InfoPath

Last post 10-05-2010 11:52 AM by Patrick Halstead. 124 replies.
Page 1 of 9 (125 items) 1 2 3 4 5 Next > ... Last »
Sort Posts: Previous Next
  • 02-16-2006 02:48 PM

    Add Sharepoint List Items with InfoPath

    Thank you for your article "Add Sharepoint List Items With InfoPath". I am currently working on a project that requires this very task. I took the article and personalized it to my particular Custom List. However, when I click Submit I get the following error message:


    The SOAP response indicates that an error occurred on the server:

    Exception of type Microsoft.SharePoint.SoapServer.SoapServerException was thrown.
    <detail>
    <errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap/">
    List does not exist

    The page you selected contains a list that does not exist. It may have been deleted by another user. Click "Home" at the top of the page to return to your Web site.
    </errorstring>
    <errorcode xmlns="http://schemas.microsoft.com/sharepoint/soap/">0x82000006</errorcode>
    </detail>


    So, it would seem that I'm missing the boat on the location of the custom list? It retrieves the data from the custom list fine. Only when I submit does it give me this error. Is there a place where I can find the exact location of the custom list? The place I retrieve the custom list is located here...

    "http://projectdev.abcd.com/Project Database"

    The custom list is displayed fine.

    On the Submit Data Connection, I am trying the Web service here...

    "http://projectdev.abcd.com/_vti_bin/lists.asmx?WSDL"

    ...and I get the mentioned error. I've tried other locations for the submit, like...

    "http://projectdev.abcd.com/Project Database/_vti_bin/lists.asmx?WSDL"

    ...but it doesn't find the web service.

    I would appreciate any help and guidance you can give.

    -Thanks
  • 02-16-2006 05:12 PM In reply to

    Re: Add Sharepoint List Items with InfoPath

    Hi Wayne and welcome to the forum!

    This is weird, Daniel is getting the same error:http://infopathdev.com/forums/topic.asp?TOPIC_ID=1748

    Did you get the GUID from your own SharePoint site? You cannot use the value displayed in the screenshots of the HowTo.

    If this is the problem, it should definitely be better noted in the HowTo. I hope this helps, but if not please let me know what you find out so we can diagnose the problem.

    ---------------
    Matt Faus
    InfoPath Dev Texas
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 02-16-2006 08:09 PM In reply to

    Re: Add Sharepoint List Items with InfoPath

    Matt, thanks for responding so quickly. I did copy the GUID from my own custom list. So, I'm still at a loss on this particular custom list. This particular custom list is located inside some layers within Sharepoint so I tried something to simplify the troubleshooting process. I targeted another custom list in a sandbox area I have for myself. On this one I'm getting a message back from InfoPath stating that the list was updated successfully. However, when I refresh the list the new entry is not there. I goto Sharepoint and it's not there either. No error message, says it's successful, but no new item to be seen.

    I will give it another go tomorrow morning. I need to get some sleep in the meantime. Thanks again Matt. If you have any other thoughts please let me know.

    p.s. This project is being developed with Managed Code via Visual Basic and Infopath 2003 SP2. I don't think this makes a difference but I thought I'd throw that in.
  • 02-16-2006 08:39 PM In reply to

    Re: Add Sharepoint List Items with InfoPath

    Matt, here's another observation I had when dealing with my custom list. I have three multi-line fields in my Sharepoint custom list. I would like to bind them to Rich Text controls in InfoPath. However, I do not see them as options when choosing to Receive Data and selecting the fields to pull in. I was hoping the receiving / submitting of Rich Text data would be a breeze with InfoPath and Sharepoint integration. Is this not the case? Any references or examples of how to accomplish this would be greatly appreciated.

    -Wayne Larimore
    http://www.waynester.net/blog
  • 02-16-2006 08:44 PM In reply to

    Re: Add Sharepoint List Items with InfoPath

    Ok, I might have found the problem with the "No Error returned but nothing was actually added".

    The columns in the SharePoint list also use a special GUID-like identifier to determine which column to add to. To get the GUID for each of your columns, follow these steps:

    1. Open list in browser
    2. Click Modify Settings and Columns
    3. In the Columns section, click on one of the columns.
    4. Look at the address bar, the variable at the very end of the URL should be like this: Field:_Column_GUID_ , where _Column_GUID_ is the GUID of the column.
    5. Copy this text down and use it in your CAML template.

    Notice that the GUID obtained in the URL is not necessarily equivalent to the Column Name in SharePoint.

    The only way I was able to reproduce the original "No List" error was having a bad list GUID (I intentionally changed it and got the error). You might try adding right and left braces { } to the front and end of the GUID in InfoPath. Hope this helps!

    Thanks for the link on your blog!

    PS - Is there any specific reason why you're still on IP SP1?

    ---------------
    Matt Faus
    InfoPath Dev Texas
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 02-17-2006 07:59 AM In reply to

    Re: Add Sharepoint List Items with InfoPath

    My mistake - I am running with Office SP2. InfoPath 2003 SP1 has been embedded on my brain I guess. Any thoughts on the previous posting about Multi-Line Fields coming across to Infopath via Receive Web Services? They don't show up.

    Here's what I see when I go into the Modify Columns and look at the address bar (not the same as your pattern example)...

    http://xxx.xxx.com/sites/wlarimore/_layouts/1033/FldEdit.aspx?List=%7BBBD3E4AC%2D3752%2D40C7%2D96E6%2D44FCE8F7A074%7D&Field=Owner

    Do I capture the portion starting after 'List=' and before '&Field' ? If so, it would be just the GUID being represented in the CAML template. Thanks in advance Matt.
  • 02-17-2006 03:42 PM In reply to

    Re: Add Sharepoint List Items with InfoPath

    Ahhhh, Ok. Now I see the problem. Your GUID has been URL-encoded and you need to de-encode it in order for it to work. From your above example, after decoding would be this:

    {BBD3E4AC-3752-40C7-96E6-44FCE8F7A074}

    %7B = {
    %2D = -
    %7D = }

    You should be able to use this fixed GUID with or without the braces. Let me know if this fixes your problem. If it does a link to this thread in the forum should be added to the HowTo for further guidance on adding items to a custom sharepoint list.

    Note that the above number sequence is your List GUID, and the value after Field is your column GUID. List GUIDs are numbers and column GUIDs are usually text.

    ---------------
    Matt Faus
    InfoPath Dev Texas
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 02-18-2006 09:03 AM In reply to

    Re: Add Sharepoint List Items with InfoPath

    I finally got an item to insert into my custom list. Albeit, it's not the original custom list I started out with. But, I believe I can go back and make it happen. I thought I'd post my update here in case others are following and needing help asap.

    In your previous reply you mentioned the List GUID being url-encoded. This wasn't a problem for me as I was using the correct one. The problem ended up being the way I formatted spaces for the Field Names inside the CAML Template file (CAML batch method).

    If you have a column with spaces you should make note of the peculiar format Sharepoint places on it...

    example:
    "Field Three" translates to "Field_x0020_Three"

    So, in your xml template you must have Field_x0020_Three defined

    The funny (or sad, depending on how you look at it) thing is I had known this. A former colleague had pointed this out to me and even gave me his source code from a project he written to accomplish the same goal - writing to custom lists in Sharepoint, but from a C# windows .net application.

    If there's anything else worth mentioning I'll post it here or on my blog at http://www.waynester.net/blog

    Thanks for your assistance!

    p.s. Hey, btw, you haven't addressed the previous inquiry about bringing over Multi-Line fields from Sharepoint into Infopath. My gut feeling is that it might not be possible without managed code handling it. But if anyone knows anything (code samples, advice, etc) I would certainly be interested.
  • 02-18-2006 10:15 AM In reply to

    Re: Add Sharepoint List Items with InfoPath

    Yes, to get the column GUID for each column, you got to Modify Settings and Columns, click on each column name in the Columns section, and look at the Field variable in the URL. Always look for the GUIDs in the URL, not by what you name them. This is really counter-intuitive, but necessary!

    Regarding, the multi-line text from SharePoint, I see what you're saying about it not being presented as an option, but I am not really sure if there is some kind of workaround to pull that data down from SharePoint. I've never done this.


    ---------------
    Matt Faus
    InfoPath Dev Texas
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 02-19-2006 03:50 PM In reply to

    Re: Add Sharepoint List Items with InfoPath

    Hi,

    just a general advice concerning web services in general:

    always test web services in a web service tool (SOAPscope or Web service studio) instead of inside IP or Visual Studio.

    that way you got less steps where things can go wrong, and you get a clearer picture of what went wrong :-)

    also retrieving data on the list (GUID's and internal column names/id's) is much easier done using for example SOAPscope than inspecting urls in sharepoint ;-)

    for the record the encoding sharepoint uses for spaces are a four digit hex UCS-2 (Universal Multiple-Octet Coded Character Set) code for the character in the most significant bit-first order. This is standard encoding in SQL server for characters that are not valid as XML in SQL server.

    I tried pulling multiline/rich text fields from Sharepoint lists before, but using managed code. This can be done by binding to the XML node itself and not the xml.Text property.

    hth

    //AndersR
  • 02-28-2006 01:25 PM In reply to

    Re: Add Sharepoint List Items with InfoPath

    This article came at just the right time for my project but I've run into a new problem. (Thanks for the tip on getting the column GUID! That solved my first problem.)

    By default, WSS shows only 100 items per page in a list. Your method gets the first 100 items perfectly but doesn't get 101+. This makes it look like the list in the form isn't getting updated. But when I check the second page of the list in WSS, the new items are there.

    How can I get all the items in the list?

    Thanks!
    Mike R
  • 02-28-2006 01:54 PM In reply to

    Re: Add Sharepoint List Items with InfoPath

    views in sharepoint by default only show 100 items.

    edit the view's item limit (modify settings ... > select view > item limit

  • 02-28-2006 01:59 PM In reply to

    Re: Add Sharepoint List Items with InfoPath

    Sorry, I wasn't clear. I wasn't referring to the list in WSS but the list displayed in the InfoPath form.
  • 02-28-2006 02:23 PM In reply to

    Re: Add Sharepoint List Items with InfoPath

    Changing the returned rows in SharePoint will also affect the list displayed in InfoPath, check out this HowTo:

    http://infopathdev.com/howto/bugs/default.aspx?i=db5faca583c64e5aa50310dea59c37de
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 03-10-2006 12:12 PM In reply to

    Re: Add Sharepoint List Items with InfoPath

    Thanks for the reminder about changing the list length in WSS. I have another question.

    Is there a way to populate the fields in the "add to" table with data from other fields in the form?

    I don't see how to access "add to" fields in design mode, so I can't set their value via the field properties. I don't want the user to have to manually re-enter data.

    Thanks,
    Mike R
Page 1 of 9 (125 items) 1 2 3 4 5 Next > ... Last »
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.