<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>SharePoint Integration</title><link>https://www.infopathdev.com:443/forums/46.aspx</link><description> For questions concerning issues in the integration of SharePoint and Microsoft InfoPath.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Update SharePoint List Item if it Already Exists</title><link>https://www.infopathdev.com:443/forums/thread/55997.aspx</link><pubDate>Fri, 18 Jun 2010 07:21:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55997</guid><dc:creator>elizas</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55997.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=55997</wfw:commentRss><description>Provided below are code samples written in C# to format an input as per SharePoint DateTime field.
/* -- Format for Date Only Field -- */      
private static String ToSPDate(String strDt)
{
    if (strDt == String.Empty)
        return strDt;
    else
        return (Convert.ToDateTime(strDt)).ToString(&amp;quot;yyyy-MM-dd&amp;quot;);
}
 
/* -- Format for DateTime Field -- */
private static String ToSPDateTime(String strDt)
{
    if (strDt == String.Empty)
        return strDt;
    else
        return (Convert.ToDateTime(strDt)).ToString(&amp;quot;yyyy-MM-ddTHH:mm:ssZ&amp;quot;);
}

http://www.mindfiresolutions.com/Format-Input-for-SharePoint-DateTime-field-186.php</description></item><item><title>Re: Update SharePoint List Item if it Already Exists</title><link>https://www.infopathdev.com:443/forums/thread/49509.aspx</link><pubDate>Mon, 30 Nov 2009 08:40:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:49509</guid><dc:creator>Daniels</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/49509.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=49509</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The following article provides a similar solution which uses a CAML template and the UpdateListItems method of the Lists web service to update an existing item in SharePoint.&amp;nbsp; The article includes some important notes when submitting data to Sharepoint using a CAML query, including the DateTime field, which requires an XML format date string (ISO8601 - &amp;quot;YYYY-MM-DDTHH:MM:SSZ&amp;quot; , &lt;span style="font-family:arial;"&gt;eg. &amp;quot;2009-07-27T21:20+01:00&lt;/span&gt;&amp;quot;, or &lt;span style="font-family:arial;"&gt;&amp;quot;2009-07-27T20:20Z&amp;quot;&lt;/span&gt; ) for the CAML query to work.&amp;nbsp; Code used in the form to populate the CAML template is written in JScript and is provided in the article. &lt;/p&gt;&lt;p&gt;See &lt;a href="http://blog-sharepoint.blogspot.com/2009/07/summary-how-to-programmatically-update.html"&gt;InfoPath - Update Existing SharePoint List Item 
								Programmatically Using CAML&lt;/a&gt; for details.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Update SharePoint List Item if it Already Exists</title><link>https://www.infopathdev.com:443/forums/thread/34291.aspx</link><pubDate>Fri, 14 Nov 2008 15:17:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34291</guid><dc:creator>JSwatter</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34291.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=34291</wfw:commentRss><description>&lt;p&gt;I appreciate your help. Using the above source I developed a solution which, while it may not be extremely efficient, gets the job done.&lt;/p&gt;
&lt;p&gt;I set up another data connection which queries the Event List. That connection is used to filter for the identical title, and returns the row ID to update.&lt;/p&gt;
&lt;p&gt;Using a variable called &amp;quot;EventExists&amp;quot; I keep track of the event existing, and then determine whether to add a new one or update an exisitng one.&lt;/p&gt;</description></item><item><title>Re: Update SharePoint List Item if it Already Exists</title><link>https://www.infopathdev.com:443/forums/thread/34263.aspx</link><pubDate>Fri, 14 Nov 2008 05:34:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34263</guid><dc:creator>Rajitha</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34263.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=34263</wfw:commentRss><description>&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;Hi,&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;Can you verify the below link once.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/cc162745.aspx#ip2007SubmitDataSPList_AddingaConnectiontotheListsWebServiceandSpecifyingtheParametersoftheUpdateListItemsWebMethod"&gt;&lt;font face="Calibri" size="3"&gt;http://msdn.microsoft.com/en-us/library/cc162745.aspx#ip2007SubmitDataSPList_AddingaConnectiontotheListsWebServiceandSpecifyingtheParametersoftheUpdateListItemsWebMethod&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;font face="Calibri" size="3"&gt;In that “&lt;/font&gt;&lt;span style="FONT-SIZE:9pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:&amp;#39;Verdana&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-bidi-font-weight:bold;"&gt;Adding a Connection to the Lists Web Service and Specifying the Parameters of the UpdateListItems Method” will tell you how to use UpdateListItems method.&lt;/span&gt; 
&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;Hope this helps.&lt;/font&gt;&lt;/p&gt;</description></item><item><title>Re: Update SharePoint List Item if it Already Exists</title><link>https://www.infopathdev.com:443/forums/thread/34230.aspx</link><pubDate>Thu, 13 Nov 2008 13:24:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34230</guid><dc:creator>JSwatter</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34230.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=34230</wfw:commentRss><description>&lt;p&gt;I apologize if I was not clear. The code I have currently seems to create new List Items, but I would like it to, if the Title Fields are equivalent, to update the existing List Item instead of creating a new one. What seems to happen if I press the button and the script runs again, with any of the information changed, is that a completely new List Item will be created. There are no errors that seem to crop up, just duplicate creation instead of editing existing items.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Would I need to query the existing list items to determine if it is a duplicate and then run an update? If so, how would I go about doing that?&lt;/p&gt;
&lt;p&gt;Thanks for your help!&lt;/p&gt;</description></item><item><title>Re: Update SharePoint List Item if it Already Exists</title><link>https://www.infopathdev.com:443/forums/thread/34209.aspx</link><pubDate>Thu, 13 Nov 2008 04:33:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34209</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34209.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=34209</wfw:commentRss><description>&lt;p&gt;Hello Welcome to the Forums,&lt;/p&gt;
&lt;p&gt;It will update the existing list item using your code. While submitting where you are getting the error? Can you give more detail on error message?&lt;/p&gt;</description></item><item><title>Update SharePoint List Item if it Already Exists</title><link>https://www.infopathdev.com:443/forums/thread/34205.aspx</link><pubDate>Wed, 12 Nov 2008 19:49:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34205</guid><dc:creator>JSwatter</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34205.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=34205</wfw:commentRss><description>&lt;p&gt;Hi everyone,&lt;/p&gt;
&lt;p&gt;I am new to both InfoPath and SharePoint so&amp;nbsp;I appreciate any help you can give.&amp;nbsp;Through the use of other sources, I have put together a form which will create List Items (really events in a Calendar List) in SharePoint programmatically. Using CAML, the&amp;nbsp;UpdateListItems method and&amp;nbsp;some VBScript, the form creates items just fine.&lt;/p&gt;
&lt;p&gt;The issue is this: I would like to modify my form so that it will overwrite the List Item/Event if the same title is being input. How would I go about doing this? Can the CAML be modified to overwrite if a duplicate is found?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I appreciate any help you can give. Here is my code thus far:&lt;/p&gt;
&lt;p&gt;CAML Script:&lt;br /&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; ?&amp;gt;&lt;br /&gt;&amp;lt;Batch&amp;gt;&lt;br /&gt;&amp;lt;Method ID=&amp;quot;1&amp;quot; Cmd=&amp;quot;New&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;Field Name=&amp;quot;Title&amp;quot; /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;Field Name=&amp;quot;Location&amp;quot; /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;Field Name=&amp;quot;Description&amp;quot; /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;Field Name=&amp;quot;EventDate&amp;quot; /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;Field Name=&amp;quot;EndDate&amp;quot; /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;Field Name=&amp;quot;ProjectManager&amp;quot; /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;Field Name=&amp;quot;ProjectSponsor&amp;quot; /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;Field Name=&amp;quot;DIPhase&amp;quot; /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;Field Name=&amp;quot;ProjectName&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;/Method&amp;gt;&lt;br /&gt;&amp;lt;/Batch&amp;gt;&lt;/p&gt;
&lt;p&gt;The basics of my code:&lt;/p&gt;
&lt;p&gt;Dim batch &lt;br /&gt;Set batch = XDocument.DataObjects(&amp;quot;EventCAML&amp;quot;).DOM&lt;br /&gt;batch.selectSingleNode(&amp;quot;/Batch/Method/Field[@Name=&amp;#39;Title&amp;#39;]&amp;quot;).text = ProjectName&lt;br /&gt;XDocument.DataAdapters(&amp;quot;Submit&amp;quot;).Submit&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>