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 9 of 9 (125 items) « First ... < Previous 5 6 7 8 9
Sort Posts: Previous Next
  • 10-23-2009 05:13 PM In reply to

    • Daniels
    • Not Ranked
      Male
    • Joined on 07-28-2009
    • Melbourne, Australia
    • Posts 18

    Re: Add Sharepoint List Items with InfoPath

    Hi Jay,

    If you are using the UpdateListItems Method of the Lists Web Service as suggested in Matt's Post, the GUID of the list being updated is stored in the ListName field as a default value (remove the curly braces {...}, so that there is just the number and hyphens "38472564-2......73634A5" ).  This is the GUID if the list only, not any individual columns.

    The CAML Template will need to have an XML Field element to map to each field in the SharePoint list which you are updating.  Once you have populated the CAML Template with the required data to be submitted to the SharePoint list, the Secondary Submit data connection will Submit the CAML template using the Lists Web Service and the UpdateListItems method.

    You will need to make sure you are using the "internal" columnn names when mapping to fields using the CAML template. The U2U CAML Query Builder can assist with finding the column names to use in the CAML template.

    When configuring the submit data connection, selecting "XML Subtree, Including Selected Element"is an important step, but this should only be done for the "updates" paramater.  Leave the default option for the ListName paramater, so that the value inside the field is used, not the field as an XML element.

    Another article which may assist explains how to update existing items in a SharePoint list using a similar technique, with some important notes for data types when updating data in SharePoint using web services. 

    See InfoPath - Update Existing SharePoint List Item Programmatically Using CAML for details.

    Thanks

    Daniel

     

    Blogs:
    SharePoint Admin & Dev - SharePoint and InfoPath Development

    Web Development & Programming - Php, C#, .NET Framework, SEO Tips

    WebmasterHub.net - Free SEO, Webmaster Resources
  • 02-06-2010 05:23 PM In reply to

    • louis
    • Not Ranked
    • Joined on 02-02-2010
    • Posts 2

    Re: Add Sharepoint List Items with InfoPath

    Whoaa Cowboy, Column Guids are text? This ain't my first rodeo, and i think you might be mistaken. Column do have guid's just like lists, they are just harder to find than pulling them from query strings.

  • 02-06-2010 06:19 PM In reply to

    • Daniels
    • Not Ranked
      Male
    • Joined on 07-28-2009
    • Melbourne, Australia
    • Posts 18

    Re: Add Sharepoint List Items with InfoPath

    louis:

    Whoaa Cowboy, Column Guids are text? This ain't my first rodeo, and i think you might be mistaken. Column do have guid's just like lists, they are just harder to find than pulling them from query strings.


    Can you use the GUID to match field elements to SharePoint list columns when using the UpdateListItems method of the Lists Web Service?  My previous post related specifically to using the UpdateListItems method to modify data in SharePoint from an InfoPath form.

    The UpdateListitems method takes the List GUID as the first paramater, and the CAML (XML) containing the update command.  When mapping elements in the CAML template to columns in SharePoint lists, the internal field name is used, not the column GUID.  The statement "This is the GUID if the list only, not any individual columns" is referring specifically to the ListName parameter of the UpdateListItems method, which requires the List GUID, not column GUIDs.  In this case, the column GUIDs can be ignored as the internal names are used to identify columns in SharePoint:

    wlarimore:
    example:
    "Field Three" translates to "Field_x0020_Three"

    So, in your xml template you must have Field_x0020_Three defined

     

    Blogs:
    SharePoint Admin & Dev - SharePoint and InfoPath Development

    Web Development & Programming - Php, C#, .NET Framework, SEO Tips

    WebmasterHub.net - Free SEO, Webmaster Resources
  • 10-05-2010 08:09 AM In reply to

    Re: Add Sharepoint List Items with InfoPath

      I filled out my form and submit it. It creates a record in SharePoint List with blank data.  Any suggestion for me to troubleshoot it?  Thank you

     

    Michael

  • 10-05-2010 11:52 AM In reply to

    Re: Add Sharepoint List Items with InfoPath

    Hi Airflight89,

    This is an old post. We have a much easier way for you to add InfoPath fields to SharePoint Lists - it's called qRules. Check it out - it's a free download (link in ad at bottom). Send us a testimonial if you like it and we'll give you a coupon for a discount off of the already inexpensive list price. No code required and you get tons of functionality.

    Cheers!

    Patrick Halstead
    Project Manager at Qdabra
Page 9 of 9 (125 items) « First ... < Previous 5 6 7 8 9
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.