Posted on February 13th, 2010 by Master-SharePoint | Comments Off
This article demonstrates how to set up secondary data connections in an InfoPath form to connect to the Lists web service to update an existing item in a SharePoint list. An XML document containing a Collaborative Application Markup Language (CAML) query is sent containing data which will map to specific fields in the specified SharePoint list.
How to integrate InfoPath forms with workflow in SharePoint to give greater control over the functionality and user interface.
When an InfoPath form is set up to submit to a SharePoint library, fields in the form can be mapped to columns/fields in the SharePoint library, or a content type which is associated with a document library. See Submit InfoPath form to SharePoint List or Library using Content Type for details and an example of how to submit an InfoPath form to a SharePoint document library.
I noticed that when trying to update a SharePoint list item using a CAML query from an InfoPath form, if the date/time format was not correct the field in the SharePoint list item would not be updated. Any updates in the CAML query after an element with an invalid date/time format were also not applied.
The following demonstrates how to use InfoPath data connections to connect to and retrieve SharePoint list contents (item metadata) for use in the form. This can be useful when InfoPath forms are used as a workflow component or interface, or if the form is being submitted to a library on a SharePoint site.
InfoPath SharePoint Integration:
http://blog-sharepoint.blogspot.com/
Tutorials, tips and techniques for integrating InfoPath forms with SharePoint
The following article demonstrates how to integrate an InfoPath form with a SharePoint form library, using a centralised template stored in a SharePoint document library and linked to a site Content Type. The form is set up to submit to a SharePoint form library
InfoPath SharePoint Integration
Posted on January 25th, 2010 by Master-SharePoint | Comments Off
Create secondary data connections in an InfoPath form to retrieve the CAML template from an XML file, then submit using a second data connection to the Lists web service on the SharePoint site containing the list being updated. The CAML template uses the UpdateListItem function from the web service to update an existing item in a SharePoint list.
This article demonstrates how to programmatically update a SharePoint list item from an InfoPath form using a CAML query to the Lists web service of the SharePoint site. The example uses secondary data connections to retrieve the CAML template from an XML file and another to submit the CAML template to a SharePoint web service using the UpdateListItem function.
The process is broken down into the following components, which are explained in detail in the article linked above.
1. Create Initial InfoPath Form
2. Set up the CAML query
3. Set up InfoPath Data Connections
4. Set up the Form Template and Required Code
Optional Steps and additional information:
- Update Repeating Field elements in the CAML Template Programmatically
- How to Submit using a Secondary Data Connection in InfoPath
Update Existing SharePoint List Item
Posted on January 25th, 2010 by Master-SharePoint | Comments Off
Programmatically loop through each node in an xml data source to find a specific element/node by the attribute value. This may be required to populate a CAML template before submitting to SharePoint via a web service. Post comments discuss a scenario where the function provided in the article can be used.
See also InfoPath Code – Loop through items in a secondary data source from a SharePoint List for the details of a solution which implements the function provided in the article, as well as a modified version.
Posted on January 25th, 2010 by Master-SharePoint | Comments Off
This article provides details, instructions and a function to convert date/time field values into ISO 8601 format when updating date/time fields in a SharePoint list using a CAML query from an InfoPath form. When updating a SharePoint list item using a CAML query, the date/time field must be in the correct format or the field in the SharePoint list item will not be updated. Any XML elements in the CAML template after the element containing the incorrectly formatted date/time value will not have an affect on the SharePoint list item either.
InfoPath – CAML Date Time format in when submitting to a SharePoint list via a Web Service