<?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>Agni Reddy</title><link>https://www.infopathdev.com:443/blogs/agni/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Open an InfoPath File from a Web Page</title><link>https://www.infopathdev.com:443/blogs/agni/archive/2006/06/28/Open-an-InfoPath-File-from-a-Web-Page.aspx</link><pubDate>Wed, 28 Jun 2006 23:22:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:101</guid><dc:creator>Agni Reddy</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;There are times when you get data from a DB and want to throw an xml file from a web page. To do that, in your aspx code you would have to build the InfoPath xml with the PI information using methods in the &lt;font face="Courier New"&gt;System.Xml&lt;/font&gt; namespace (or &lt;font face="Courier New"&gt;StringBuilder String.Format&lt;/font&gt; etc). This xml string is then given as input to the &lt;font face="Courier New"&gt;SendContent&lt;/font&gt; function shown below. This function should also be added to the code running behind the aspx page.&lt;/p&gt;&lt;p&gt;&lt;table class="msoUcTable" style="table-layout:fixed;width:100%;border-collapse:collapse;word-wrap:break-word;border:medium none;"&gt;&lt;tr&gt;&lt;td align="left" style="background-color:#e6e6e6;border:#e6e6e6 6pt solid;"&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;public static void SendContent(string content)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(content == null || content == String.Empty)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Clear();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; byte []bytes = Encoding.UTF8.GetBytes(content);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.AddHeader(&amp;quot;Content-Disposition&amp;quot;, &amp;quot;attachment; filename=MyFileName.Xml&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.ContentType = &amp;quot;text/xml&amp;quot;;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.AddHeader(&amp;quot;Content-Length&amp;quot;, bytes.Length.ToString());&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Write(content);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.End();&lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;This will throw up a dialog box with the file name specified in the &lt;font face="Courier New"&gt;filename=MyFileName.Xml&lt;/font&gt; where the user will be asked to either Open, Save or Cancel. When Open is clicked the file will open InfoPath using the solution PI provided. But the code above shows a regular xml icon in the Open/Save/Cancel dialog box. If you want to change this to show an InfoPath Icon instead change the following line of code:&lt;/p&gt;&lt;p&gt;&lt;table class="msoUcTable" style="table-layout:fixed;width:100%;border-collapse:collapse;word-wrap:break-word;border:medium none;"&gt;&lt;tr&gt;&lt;td align="left" style="background-color:#e6e6e6;border:#e6e6e6 6pt solid;"&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" size="2"&gt;Response.AddHeader(&amp;quot;Content-Disposition&amp;quot;, &amp;quot;attachment; filename=MyFileName.Xml&amp;quot;);&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;As follows:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;table class="msoUcTable" style="table-layout:fixed;width:100%;border-collapse:collapse;word-wrap:break-word;border:medium none;"&gt;&lt;tr&gt;&lt;td align="left" style="background-color:#e6e6e6;border:#e6e6e6 6pt solid;"&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;Response.AddHeader(&amp;quot;Content-Disposition&amp;quot;, &amp;quot;attachment; filename=MyFileName.infopathXml&amp;quot;);&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;You can also change the file name to be more pertinent by getting some data from the xml string and putting that information instead of &lt;font face="Courier New"&gt;MyFileName&lt;/font&gt;.&lt;/p&gt;&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=101" width="1" height="1"&gt;</description></item><item><title>Get Name of Person Logged Into SharePoint</title><link>https://www.infopathdev.com:443/blogs/agni/archive/2006/06/28/Get-Name-of-Person-Logged-Into-SharePoint.aspx</link><pubDate>Wed, 28 Jun 2006 23:05:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:100</guid><dc:creator>Agni Reddy</dc:creator><slash:comments>5</slash:comments><description>&lt;p&gt;Generally it&amp;#39;s not possible to get the logged in username of the person logged into SharePoint. To do this we need to first create a file and query the modified name from the SharePoint form library for this file. Once we get the name we then delete this file. This document explains how to do this.&lt;/p&gt;&lt;ol start="1" style="margin-top:0px;margin-bottom:0px;"&gt;&lt;li&gt;Add a Sharepoint Submit data connection named &lt;strong&gt;SharePointSubmit&lt;/strong&gt; to the solution. &lt;/li&gt;&lt;li&gt;In the &lt;font face="Courier New"&gt;OnLoad&lt;/font&gt; code of the solution, add code to submit this form to SharePoint:&lt;/li&gt;&lt;/ol&gt;&lt;p style="padding-left:40px;"&gt;&lt;table class="msoUcTable" style="table-layout:fixed;width:100%;border-collapse:collapse;word-wrap:break-word;border:medium none;"&gt;&lt;tr&gt;&lt;td align="left" style="background-color:#e6e6e6;border:#e6e6e6 6pt solid;"&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;DAVAdapter sharePoint = (DAVAdapter)thisXDocument.DataAdapters[&amp;quot;SharePointSubmit&amp;quot;];&amp;nbsp;&lt;br /&gt;sharePoint.Submit();&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;ol start="3" style="margin-top:0px;margin-bottom:0px;"&gt;&lt;li&gt;Then follow the &lt;a href="http://www.infopathdev.com/howto/tutorials/default.aspx?i=5eb5c19c1e2747bc965fe1720534d8dd"&gt;Query for Items in SharePoint Form Library Using GetListItems Web Method&lt;/a&gt; how to article to get the details of this form using &lt;font face="Courier New"&gt;GetListItems&lt;/font&gt; SharePoint Web service function. &lt;/li&gt;&lt;li&gt;Add the following code into the FormCode.cs of the solution:&lt;/li&gt;&lt;/ol&gt;&lt;p style="padding-left:40px;"&gt;&lt;table class="msoUcTable" style="table-layout:fixed;width:100%;border-collapse:collapse;word-wrap:break-word;border:medium none;"&gt;&lt;tr&gt;&lt;td align="left" style="background-color:#e6e6e6;border:#e6e6e6 6pt solid;"&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;// Pass the GetlistItem node received from the previous step into &lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;this method.&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;private string getUserName(IXMLDOMNode getListItemsResult)&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;{&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string userName = getListItemsResult.selectNodes(&amp;quot;//rs:data/z:row/@ows_Editor&amp;quot;);&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // To get the Modified Username from the SharePoint&amp;nbsp;Form Library.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; userName = userName.Substring(4);&lt;br /&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // &amp;quot;20;#&amp;quot; characters occur before user name. This method skips the mysterious characters.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return userName;&lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;ol start="5" style="margin-top:0px;margin-bottom:0px;"&gt;&lt;li&gt;Now delete this file using the &lt;font face="Courier New"&gt;UpdateListItems&lt;/font&gt; SharePoint Web service function. Details on how to use this function are&amp;nbsp;in the &lt;a href="http://www.infopathdev.com/howto/tutorials/default.aspx?i=1d52979046884d8186c9393a1ea95109"&gt;Delete File from SharePoint&lt;/a&gt; how to article. &lt;/li&gt;&lt;li&gt;You can use this username where ever you need the logged in SharePoint user name.&lt;/li&gt;&lt;/ol&gt;&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=100" width="1" height="1"&gt;</description></item><item><title>Query for Items in SharePoint Form Library Using GetListItems Web Method</title><link>https://www.infopathdev.com:443/blogs/agni/archive/2006/05/15/Query-for-Items-in-SharePoint-Form-Library-Using-GetListItems-Web-Method.aspx</link><pubDate>Mon, 15 May 2006 18:40:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:107</guid><dc:creator>Agni Reddy</dc:creator><slash:comments>12</slash:comments><description>&lt;p&gt;Generally to get data from SharePoint form library a receive data connection to a SharePoint list is taken. But there a couple of drawbacks of this data connection:&lt;/p&gt;&lt;ol start="1" style="margin-top:0px;margin-bottom:0px;"&gt;&lt;li&gt;It only gives the data of the items in the default view. So if the item limit is 100 then the only the first 100 items data is received. &lt;/li&gt;&lt;li&gt;There is no way to query so as to get the information on a certain number of items in the SharePoint form library.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;To solve these two issues we can take a data connection to the &lt;font face="Courier New"&gt;GetListItems&lt;/font&gt; method in the Lists SharePoint web service. One thing to note is that any data that you want to query on needs to be present in the view. &lt;/p&gt;&lt;p&gt;A direct data connection to the &lt;font face="Courier New"&gt;GetListItems&lt;/font&gt; method cannot be taken and this HowTo shows how the data connection can be taken and how to use it to query items. We will create a solution with one field and then query for items with a certain value in that field.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Create InfoPath solution:&lt;/strong&gt;&lt;/p&gt;&lt;ol start="1" style="margin-top:0px;margin-bottom:0px;"&gt;&lt;li&gt;Open Visual Studio and create a new InfoPath project. &lt;/li&gt;&lt;li&gt;Create a new field named SearchValue and drag drop it into the UI. &lt;/li&gt;&lt;li&gt;Create another field named QueryValue and drag drop it into the UI. &lt;/li&gt;&lt;li&gt;Now add a button named Search in the view. &lt;/li&gt;&lt;li&gt;Go to &amp;quot;Tools-&amp;gt;Form Options&amp;quot; and Click on Form Library Columns Tab. &lt;/li&gt;&lt;li&gt;Click on Add, select field SearchValue. &lt;/li&gt;&lt;/ol&gt;&lt;p style="padding-left:40px;"&gt;&lt;img height="541" src="http://cs.infopathdev.com/photos/blog_pictures/images/105/original.aspx" style="width:452px;height:541px;" width="452" /&gt;&lt;/p&gt;&lt;ol start="7" style="margin-top:0px;margin-bottom:0px;"&gt;&lt;li&gt;Click &amp;quot;OK&amp;quot; two times to save changes.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;Publish InfoPath form to Share Point:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Our next step is to publish the form to Share Point.&lt;/p&gt;&lt;ol start="1" style="margin-top:0px;margin-bottom:0px;"&gt;&lt;li&gt;Go &amp;quot;File-&amp;gt;Publish&amp;quot;, publish dialogue box is seen. &lt;/li&gt;&lt;li&gt;Click &amp;quot;Next&amp;quot; button. &lt;/li&gt;&lt;li&gt;Select &amp;quot;To a Share Point Library&amp;quot; and click on Next button. &lt;/li&gt;&lt;li&gt;Select &amp;quot;Create a new Form Library&amp;quot; and click on Next button. &lt;/li&gt;&lt;li&gt;Enter Share Point site URL where you want to publish the form and click on Next button. &lt;/li&gt;&lt;li&gt;Enter the form library name and Click on Next button. &lt;/li&gt;&lt;li&gt;Verify if the &amp;quot;Search&amp;quot; field is listed in the promoted properties and Click on Publish button to publish the form. &lt;/li&gt;&lt;li&gt;Now the form is published, click on close button to close the publish dialog.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;Create GetListItemsConfig.xml for use in dataconnection:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Next step is to create an XML file to use in querying the database.&lt;br /&gt;&lt;/p&gt;&lt;ol start="1" style="margin-top:0px;margin-bottom:0px;"&gt;&lt;li&gt;Copy the following xml into a text editor and save it as GetListItemsConfig.xml:&lt;/li&gt;&lt;/ol&gt;&lt;p style="padding-left:40px;"&gt;&lt;table class="msoUcTable" style="table-layout:fixed;width:100%;border-collapse:collapse;word-wrap:break-word;border:medium none;"&gt;&lt;tr&gt;&lt;td align="left" style="background-color:#e6e6e6;border:#e6e6e6 6pt solid;"&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&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;GetListItemsConfig&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;LibraryName&amp;gt;&lt;font color="#ff0000"&gt;GetListItems&lt;/font&gt;&amp;lt;/LibraryName&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ViewGuid&amp;gt;&lt;font color="#ff0000"&gt;FD71288E-8BFC-4D66-8886-9DB767D528F7&lt;/font&gt;&amp;lt;/ViewGuid&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;QueryXmlString&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Query&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Where&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Eq&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;FieldRef Name=&amp;#39;xd__x007b_&lt;font color="#ff0000"&gt;14A5521A&lt;/font&gt;_x002d_&lt;font color="#ff0000"&gt;CE31&lt;/font&gt;_x002d_&lt;font color="#ff0000"&gt;4DBC&lt;/font&gt;_x002d_&lt;font color="#ff0000"&gt;924F&lt;/font&gt;_x002d_&lt;font color="#ff0000"&gt;937E7A4288B8&lt;/font&gt;_x007d_&amp;#39; /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Value Type=&amp;#39;Text&amp;#39;&amp;gt;&amp;lt;/Value&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Eq&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Where&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Query&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/QueryXmlString&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;RowLimit&amp;gt;&lt;font color="#ff0000"&gt;1000000&lt;/font&gt;&amp;lt;/RowLimit&amp;gt;&amp;nbsp;&lt;br /&gt;&amp;lt;/GetListItemsConfig&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;All of the items in red need to be replaced as per instructions below.&amp;nbsp;Please note that &lt;font face="Courier New"&gt;&amp;lt;LibraryName&amp;gt;&lt;/font&gt; should be same as the form library name given in step 6 above.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;To obtain View GUID follow these steps:&lt;/strong&gt;&lt;/p&gt;&lt;ol start="1" style="margin-top:0px;margin-bottom:0px;"&gt;&lt;li&gt;Open the form library to which you have published the InfoPath form. &lt;/li&gt;&lt;li&gt;Click on &amp;quot;Modified&amp;quot; column in the share point promoted lists. &lt;/li&gt;&lt;li&gt;Copy the URL in the address bar into a note pad.&lt;/li&gt;&lt;/ol&gt;&lt;p style="padding-left:40px;"&gt;&lt;img height="250" src="http://cs.infopathdev.com/photos/blog_pictures/images/106/original.aspx" style="width:865px;height:250px;" width="865" /&gt;&lt;/p&gt;&lt;p style="padding-left:40px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="padding-left:40px;"&gt;For eg: http://system2/sites/GetListItems/Forms/AllItems.aspx?SortField=Last%5fx0020%5fModified&amp;amp;SortDir=Asc&amp;amp;View=%7b&lt;font color="#ff0000"&gt;FD71288E&lt;/font&gt;%2d&lt;font color="#ff0000"&gt;8BFC&lt;/font&gt;%2d&lt;font color="#ff0000"&gt;4D66&lt;/font&gt;%2d&lt;font color="#ff0000"&gt;8886&lt;/font&gt;%2d&lt;font color="#ff0000"&gt;9DB767D528F7&lt;/font&gt;%7d&lt;/p&gt;&lt;ol start="4" style="margin-top:0px;margin-bottom:0px;"&gt;&lt;li&gt;Search for &amp;amp;View, take the number/GUID after &amp;quot;=&amp;quot; in the URL and remove %7b at starting and %7d at ending, replace %2d with hyphen &amp;quot;-&amp;quot;.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;To obtain &lt;font face="Courier New"&gt;&amp;lt;FieldRef&amp;gt;&lt;/font&gt; &amp;quot;Name&amp;quot; value follow these steps:&lt;/strong&gt;&lt;/p&gt;&lt;ol start="1" style="margin-top:0px;margin-bottom:0px;"&gt;&lt;li&gt;Open the manifest.xsf of the solution in a text editor (be careful that you do not make any changes to the manifest.xsf file). &lt;/li&gt;&lt;li&gt;Look for the list properties node:&lt;/li&gt;&lt;/ol&gt;&lt;p style="padding-left:40px;"&gt;&lt;table class="msoUcTable" style="table-layout:fixed;width:100%;border-collapse:collapse;word-wrap:break-word;border:medium none;"&gt;&lt;tr&gt;&lt;td align="left" style="background-color:#e6e6e6;border:#e6e6e6 6pt solid;"&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" size="2"&gt;&amp;lt;xsf:listProperties&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsf:fields&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" size="2"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&amp;lt;xsf:field name=&amp;quot;SearchValue&amp;quot;&amp;nbsp; columnName=&amp;quot;{&lt;font color="#ff0000"&gt;14A5521A-CE31-4DBC-924F-937E7A4288B8&lt;/font&gt;}&amp;quot; node=&amp;quot;/my:myFields/my:SearchValue&amp;quot; type=&amp;quot;xsd:string&amp;quot;&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" size="2"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&amp;lt;/xsf:field&amp;gt;&lt;br /&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&amp;lt;/xsf:fields&amp;gt;&lt;br /&gt;&amp;lt;/xsf:listProperties&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;ol start="3" style="margin-top:0px;margin-bottom:0px;"&gt;&lt;li&gt;Copy the GUID of the promoted field in the brackets &amp;quot;{}&amp;quot;.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;br /&gt;&lt;strong&gt;Add the GetListItemsConfig.xml a secondary data connection:&lt;/strong&gt;&lt;/p&gt;&lt;ol start="1" style="margin-top:0px;margin-bottom:0px;"&gt;&lt;li&gt;Choose Data Connections from the Tools menu, and then click Add. &lt;/li&gt;&lt;li&gt;In the Data Connection Wizard, select Receive Data, and then click Next. &lt;/li&gt;&lt;li&gt;Select XML Document, and then click Next. &lt;/li&gt;&lt;li&gt;Click Browse, locate and select the GetListItemsConfig.xml file, click Open, and then click Next. &lt;/li&gt;&lt;li&gt;Click Finish, click Yes, and then click Close.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;br /&gt;&lt;strong&gt;Take connection to &lt;font face="Courier New"&gt;GetListItems&lt;/font&gt; webmethod:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Now follow the steps below to add the GetListItems web method as a data connection:&lt;/p&gt;&lt;ol start="1" style="margin-top:0px;margin-bottom:0px;"&gt;&lt;li&gt;Go to Tools-&amp;gt;DataConnections&amp;nbsp; and Click on Add button. &lt;/li&gt;&lt;li&gt;Select Receive Data and click on Next button. &lt;/li&gt;&lt;li&gt;Select WebService Radio Button and Click on Next button. &lt;/li&gt;&lt;li&gt;Enter the Webservice address:&lt;br /&gt;for eg: http://&amp;lt;sharepoint server name&amp;gt;/&amp;lt;subsite name&amp;gt;/_vti_bin/lists.asmx?WSDL&amp;quot; &lt;/li&gt;&lt;li&gt;Select Getlist and Click on Next. &lt;/li&gt;&lt;li&gt;Set Sample value as form library name that you just created and click on next. &lt;/li&gt;&lt;li&gt;Uncheck the Check Box Automatically retrieve data when a form is opened. &lt;/li&gt;&lt;li&gt;Enter the name as GetListItems and click on Finish. &lt;/li&gt;&lt;li&gt;Close the InfoPath form and open the GetlistItems.xml file. &lt;/li&gt;&lt;li&gt;Replace the existing XML data with the following XML data and save the xml:&lt;/li&gt;&lt;/ol&gt;&lt;p style="padding-left:40px;"&gt;&lt;table class="msoUcTable" style="table-layout:fixed;width:100%;border-collapse:collapse;word-wrap:break-word;border:medium none;"&gt;&lt;tr&gt;&lt;td align="left" style="background-color:#e6e6e6;border:#e6e6e6 6pt solid;"&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;lt;dfs:myFields&lt;br /&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:dfs=&amp;quot;&lt;/font&gt;&lt;a href="http://www.infopathdev.com/cgi-bin/awredir.pl?url=http://schemas.microsoft.com/office/infopath/2003/dataFormSolution" target="IPD"&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution&lt;/font&gt;&lt;/a&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;quot;&lt;br /&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;xmlns:ns5=&amp;quot;&lt;/font&gt;&lt;a href="http://www.infopathdev.com/cgi-bin/awredir.pl?url=http://schemas.microsoft.com/sharepoint/soap/" target="IPD"&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;http://schemas.microsoft.com/sharepoint/soap/&lt;/font&gt;&lt;/a&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;quot;&lt;br /&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;xmlns:my=&amp;quot;&lt;/font&gt;&lt;a href="http://www.infopathdev.com/cgi-bin/awredir.pl?url=http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-05-12T09:05:35" target="IPD"&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-05-12T09:05:35&lt;/font&gt;&lt;/a&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;quot;&lt;br /&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;xmlns:soap=&amp;quot;&lt;/font&gt;&lt;a href="http://www.infopathdev.com/cgi-bin/awredir.pl?url=http://schemas.xmlsoap.org/soap/envelope/" target="IPD"&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;http://schemas.xmlsoap.org/soap/envelope/&lt;/font&gt;&lt;/a&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;quot;&lt;br /&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;xmlns:xsi=&amp;quot;&lt;/font&gt;&lt;a href="http://www.infopathdev.com/cgi-bin/awredir.pl?url=http://www.w3.org/2001/XMLSchema-instance" target="IPD"&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/font&gt;&lt;/a&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;quot;&lt;br /&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;xmlns:xsd=&amp;quot;&lt;/font&gt;&lt;a href="http://www.infopathdev.com/cgi-bin/awredir.pl?url=http://www.w3.org/2001/XMLSchema" target="IPD"&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;http://www.w3.org/2001/XMLSchema&lt;/font&gt;&lt;/a&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;quot;&amp;gt;&lt;br /&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&amp;lt;dfs:queryFields&amp;gt;&lt;br /&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&amp;lt;ns5:GetListItems&amp;gt;&lt;br /&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&amp;lt;ns5:listName&amp;gt;&amp;lt;/ns5:listName&amp;gt;&lt;br /&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&amp;lt;ns5:viewName&amp;gt;&amp;lt;/ns5:viewName&amp;gt;&lt;br /&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&amp;lt;ns5:query&amp;gt;&amp;lt;/ns5:query&amp;gt;&lt;br /&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&amp;lt;ns5:rowLimit&amp;gt;&amp;lt;/ns5:rowLimit&amp;gt;&lt;br /&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&amp;lt;/ns5:GetListItems&amp;gt;&lt;br /&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&amp;lt;/dfs:queryFields&amp;gt;&lt;br /&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&amp;lt;dfs:dataFields&amp;gt;&lt;br /&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&amp;lt;ns5:GetListItemsResponse&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&amp;lt;ns5:GetListItemsResult&amp;gt;&amp;lt;/ns5:GetListItemsResult&amp;gt;&lt;br /&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&amp;lt;/ns5:GetListItemsResponse&amp;gt;&lt;br /&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;font style="font-size:10pt;"&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&amp;lt;/dfs:dataFields&amp;gt;&lt;br /&gt;&amp;lt;/dfs:myFields&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;ol start="11" style="margin-top:0px;margin-bottom:0px;"&gt;&lt;li&gt;Open the manifest.xsf in text editor and search for &lt;strong&gt;&amp;lt;xsf:dataObject name=&amp;quot;GetListItems&lt;/strong&gt;. &lt;/li&gt;&lt;li&gt;You will see the following data:&lt;/li&gt;&lt;/ol&gt;&lt;p style="padding-left:40px;"&gt;&lt;table class="msoUcTable" style="table-layout:fixed;width:100%;border-collapse:collapse;word-wrap:break-word;border:medium none;"&gt;&lt;tr&gt;&lt;td align="left" style="background-color:#e6e6e6;border:#e6e6e6 6pt solid;"&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;lt;xsf:operation name=&amp;quot;&lt;font color="#ff0000"&gt;GetList&lt;/font&gt;&amp;quot;&lt;br /&gt;&amp;lt;xsf:operation name=&amp;quot;&lt;font color="#ff0000"&gt;GetList&lt;/font&gt;&amp;quot; soapAction=&amp;quot;&lt;/font&gt;&lt;a href="http://www.infopathdev.com/cgi-bin/awredir.pl?url=http://schemas.microsoft.com/sharepoint/soap/GetList" target="IPD"&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;http://schemas.microsoft.com/sharepoint/soap/&lt;font color="#ff0000"&gt;GetList&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;quot; serviceUrl=&amp;quot;&lt;/font&gt;&lt;a href="http://www.infopathdev.com/cgi-bin/awredir.pl?url=http://system2/sites/_vti_bin/lists.asmx" target="IPD"&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;http://system2/sites/_vti_bin/lists.asmx&lt;/font&gt;&lt;/a&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;quot;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;ol start="13" style="margin-top:0px;margin-bottom:0px;"&gt;&lt;li&gt;Change &amp;quot;GetList&amp;quot; shown as in red to &amp;quot;&lt;strong&gt;GetListItems&lt;/strong&gt;&amp;quot; and save the manifest.xsf. Be careful that you do not make any other changes. &lt;/li&gt;&lt;li&gt;With this you now have a data connection to the &lt;font face="Courier New"&gt;GetListItems &lt;/font&gt;web method.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;Add code to query from SharePoint form library created above:&lt;/strong&gt;&lt;/p&gt;&lt;ol start="1" style="margin-top:0px;margin-bottom:0px;"&gt;&lt;li&gt;Double Click on the Search button the view. &lt;/li&gt;&lt;li&gt;Click on Edit Form Code. &lt;/li&gt;&lt;li&gt;In the new function that gets created add the following code:&lt;/li&gt;&lt;/ol&gt;&lt;p style="padding-left:40px;"&gt;&lt;table class="msoUcTable" style="table-layout:fixed;width:100%;border-collapse:collapse;word-wrap:break-word;border:medium none;"&gt;&lt;tr&gt;&lt;td align="left" style="background-color:#e6e6e6;border:#e6e6e6 6pt solid;"&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;string queryValue = thisXDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:QueryValue&amp;quot;).text;&lt;br /&gt;IXMLDOMNode getListItemResult = getListItems(queryValue);&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;ol start="4" style="margin-top:0px;margin-bottom:0px;"&gt;&lt;li&gt;Copy the following code into FormCode.cs to get the &lt;font face="Courier New"&gt;Getlistitems&lt;/font&gt;:&lt;/li&gt;&lt;/ol&gt;&lt;p style="padding-left:40px;"&gt;&lt;table class="msoUcTable" style="table-layout:fixed;width:100%;border-collapse:collapse;word-wrap:break-word;border:medium none;"&gt;&lt;tr&gt;&lt;td align="left" style="background-color:#e6e6e6;border:#e6e6e6 6pt solid;"&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;private IXMLDOMNode getListItems(string queryValue)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // get the DOM and set Property to be able to access the GetListItems DOM correctly&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IXMLDOMDocument2 domGetListItems = (IXMLDOMDocument2)thisXDocument.GetDOM(&amp;quot;GetListItems&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; domGetListItems.setProperty(&amp;quot;SelectionNamespaces&amp;quot;, &amp;quot;xmlns:dfs=&amp;#39;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution&amp;#39; xmlns:ns5=&amp;#39;http://schemas.microsoft.com/sharepoint/soap/&amp;#39; xmlns:my=&amp;#39;http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-03-29T21:51:38&amp;#39; xmlns:ns7=&amp;#39;http://schemas.xmlsoap.org/soap/envelope/&amp;#39; xmlns:xsi=&amp;#39;http://www.w3.org/2001/XMLSchema-instance&amp;#39; xmlns:xsd=&amp;#39;http://www.w3.org/2001/XMLSchema&amp;#39; xmlns:rs=&amp;#39;urn:schemas-microsoft-com:rowset&amp;#39; xmlns:z=&amp;#39;#RowsetSchema&amp;#39;&amp;quot;);&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set the Library name&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; thisXDocument.GetDOM(&amp;quot;GetListItems&amp;quot;).selectSingleNode(&amp;quot;/dfs:myFields/dfs:queryFields/ns5:GetListItems/ns5:listName&amp;quot;).text = thisXDocument.GetDOM(&amp;quot;GetListItemsConfig&amp;quot;).selectSingleNode(&amp;quot;/GetListItemsConfig/LibraryName&amp;quot;).text;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Set the view Guid&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; thisXDocument.GetDOM(&amp;quot;GetListItems&amp;quot;).selectSingleNode(&amp;quot;/dfs:myFields/dfs:queryFields/ns5:GetListItems/ns5:viewName&amp;quot;).text = thisXDocument.GetDOM(&amp;quot;GetListItemsConfig&amp;quot;).selectSingleNode(&amp;quot;/GetListItemsConfig/ViewGuid&amp;quot;).text;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set the Row limit&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; thisXDocument.GetDOM(&amp;quot;GetListItems&amp;quot;).selectSingleNode(&amp;quot;/dfs:myFields/dfs:queryFields/ns5:GetListItems/ns5:rowLimit&amp;quot;).text = thisXDocument.GetDOM(&amp;quot;GetListItemsConfig&amp;quot;).selectSingleNode(&amp;quot;/GetListItemsConfig/RowLimit&amp;quot;).text;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Get the Query Node from GetListItemsConfig&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IXMLDOMNode fileQueryNode = thisXDocument.GetDOM(&amp;quot;GetListItemsConfig&amp;quot;).selectSingleNode(&amp;quot;/GetListItemsConfig/QueryXmlString/Query &amp;quot;);&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set the Value from the text box in the value node&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fileQueryNode.selectSingleNode (&amp;quot;Where/Eq/Value&amp;quot;).text = queryValue;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Get the&amp;nbsp; query node from the GetListItems query parameter nodes&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IXMLDOMNode oQuery = thisXDocument.GetDOM(&amp;quot;GetListItems&amp;quot;).selectSingleNode(&amp;quot;/dfs:myFields/dfs:queryFields/ns5:GetListItems/ns5:query&amp;quot;);&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Append the query node&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oQuery.appendChild(fileQueryNode);&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Query sharepoint using GetListItems dataconnection&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WebServiceAdapter2 getListItemsWebserviceAdapter = (WebServiceAdapter2) thisXDocument.DataAdapters[&amp;quot;GetListItems&amp;quot;];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; getListItemsWebserviceAdapter.Query();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch(Exception ex)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; thisXDocument.UI.Alert(ex.Message);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return null;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Return the data given&amp;nbsp; Sharepoint querying&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IXMLDOMNode getListItemsResult = thisXDocument.GetDOM(&amp;quot;GetListItems&amp;quot;).selectSingleNode(&amp;quot;/dfs:myFields/dfs:dataFields/ns5:GetListItemsResponse/ns5:GetListItemsResult&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return getListItemsResult;&lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;ol start="5" style="margin-top:0px;margin-bottom:0px;"&gt;&lt;li&gt;Compile the code. &lt;/li&gt;&lt;li&gt;Republish the InfoPath form on to the existing form library created above&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;To verify that it is working correctly:&lt;/strong&gt;&lt;/p&gt;&lt;ol start="1" style="margin-top:0px;margin-bottom:0px;"&gt;&lt;li&gt;Create multiple forms and save to the SharePoint form library. &lt;/li&gt;&lt;li&gt;Click on &amp;quot;Fill out a form&amp;quot;. &lt;/li&gt;&lt;li&gt;Open the visual studio project. &lt;/li&gt;&lt;li&gt;Go to Tools-&amp;gt; DebugProcesses. &lt;/li&gt;&lt;li&gt;Select &amp;quot;infopath.exe&amp;quot;, click on &amp;quot;Attach&amp;quot;. &lt;/li&gt;&lt;li&gt;Select &amp;quot;Common Language Runtime&amp;quot; and Click on &amp;quot;Ok&amp;quot; and &amp;quot;Close&amp;quot; buttons. &lt;/li&gt;&lt;li&gt;Now go to &amp;quot;return getListItemsResult;&amp;quot; line of code, right click and select Insert breakpoint. &lt;/li&gt;&lt;li&gt;Enter text you want to query on in the Query Value textbox in InfoPath. &lt;/li&gt;&lt;li&gt;Now click on search button. &lt;/li&gt;&lt;li&gt;When walking through the code you will see that the &lt;font face="Courier New"&gt;getListItemsResult&lt;/font&gt; node will have the correct data from the SharePoint site.&lt;/li&gt;&lt;/ol&gt;&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=107" width="1" height="1"&gt;</description></item><item><title>Improve Rendering Performance for a Slow View</title><link>https://www.infopathdev.com:443/blogs/agni/archive/2006/04/24/Improve-Rendering-Performance-for-a-Slow-View.aspx</link><pubDate>Mon, 24 Apr 2006 23:55:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:104</guid><dc:creator>Agni Reddy</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;&lt;strong&gt;Update 2007-06-24 by Shiraz Cupala:&lt;/strong&gt; There is a bug that affects this in InfoPath 2007 and MS has released a hotfix for it here: &lt;a href="http://www.infopathdev.com/forums/t/6043.aspx"&gt;http://www.infopathdev.com/forums/t/6043.aspx&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;=====&lt;/p&gt;
&lt;p&gt;If you have any action that results in a lot of UI changes in the view then the form will become very slow. This is because repainting the entire view in InfoPath can take time. We don&amp;#39;t know why but this happens even if you use the InfoPath OM method &lt;font face="Courier New"&gt;thisXDocument.View.DisableAutoUpdate()&lt;/font&gt; to turn off view autoupdating.&lt;/p&gt;
&lt;p&gt;Some instances where form could get slow are when single button click:&lt;br /&gt;&lt;/p&gt;
&lt;ol style="MARGIN-TOP:0px;MARGIN-BOTTOM:0px;"&gt;
&lt;li&gt;Inserts lot of rows in a repeating table or &lt;/li&gt;
&lt;li&gt;Makes lot of changes to show/hide fields or sections in the view.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;You can improve performance by switching to another view and coming back to the initial view. But InfoPath does not allow switching views twice in single action. The following steps show how this can be done:&lt;/p&gt;
&lt;ol style="MARGIN-TOP:0px;MARGIN-BOTTOM:0px;"&gt;
&lt;li&gt;Open a new InfoPath form in design mode. &lt;/li&gt;
&lt;li&gt;Add a new view named &lt;strong&gt;View 2&lt;/strong&gt;. &lt;/li&gt;
&lt;li&gt;In View1, add a Table with Title Layout Table. &lt;/li&gt;
&lt;li&gt;Then insert a Button Control into the view and change name of the button as &lt;strong&gt;Switch Views&lt;/strong&gt;.&lt;/li&gt;&lt;/ol&gt;
&lt;p style="PADDING-LEFT:40px;"&gt;&lt;img style="WIDTH:658px;HEIGHT:106px;" height="106" src="http://www.infopathdev.com/photos/blog_pictures/images/102/original.aspx" width="658" alt="" /&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;Figure 1. &lt;/strong&gt;View 1 with a Button Control.&lt;/em&gt;&lt;/p&gt;
&lt;ol style="MARGIN-TOP:0px;MARGIN-BOTTOM:0px;" start="5"&gt;
&lt;li&gt;Double Click on the Button to open Button Properties. &lt;/li&gt;
&lt;li&gt;In the General tab click on Rules button. &lt;/li&gt;
&lt;li&gt;Click on Add button and then Add Action. &lt;/li&gt;
&lt;li&gt;Select Switch Views from Action drop-down and View 2 in View drop-down. &lt;/li&gt;
&lt;li&gt;Click OK four times to save all the changes. &lt;/li&gt;
&lt;li&gt;Select Tools -&amp;gt; Programming -&amp;gt; On Context Change Event.&lt;/li&gt;&lt;/ol&gt;
&lt;p style="PADDING-LEFT:40px;"&gt;&lt;img style="WIDTH:683px;HEIGHT:279px;" height="279" src="http://www.infopathdev.com/photos/blog_pictures/images/103/original.aspx" width="683" alt="" /&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;Figure 2. &lt;/strong&gt;Selecting OnContextChangeEvent.&lt;/em&gt;&lt;/p&gt;
&lt;ol style="MARGIN-TOP:0px;MARGIN-BOTTOM:0px;" start="11"&gt;
&lt;li&gt;Enter the following code for &lt;font face="Courier New"&gt;OnContextChange&lt;/font&gt; Event handler:&lt;/li&gt;&lt;/ol&gt;
&lt;table class="msoUcTable" style="BORDER-RIGHT:medium none;TABLE-LAYOUT:fixed;BORDER-TOP:medium none;BORDER-LEFT:medium none;WIDTH:100%;BORDER-BOTTOM:medium none;BORDER-COLLAPSE:collapse;WORD-WRAP:break-word;" class="msoUcTable"&gt;



&lt;tr&gt;
&lt;td class="" style="BORDER-RIGHT:#e6e6e6 6pt solid;BORDER-TOP:#e6e6e6 6pt solid;BORDER-LEFT:#e6e6e6 6pt solid;BORDER-BOTTOM:#e6e6e6 6pt solid;BACKGROUND-COLOR:#e6e6e6;" align="left"&gt;
&lt;p&gt;&lt;font style="FONT-SIZE:10pt;" face="Courier New" color="#333399"&gt;function XDocument::OnContextChange(eventObj) &lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(XDocument.View.Name == &amp;quot;View 2&amp;quot;) &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XDocument.View.SwitchView(&amp;quot;View 1&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;ol style="MARGIN-TOP:0px;MARGIN-BOTTOM:0px;" start="12"&gt;
&lt;li&gt;Save the solution.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;By adding these steps to a solution that has some slow operations, you can make it faster. This won&amp;#39;t work in every case, but can significantly help when the issue is with view repainting.&lt;/p&gt;&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=104" width="1" height="1"&gt;</description><category domain="https://www.infopathdev.com:443/blogs/agni/archive/tags/Views/default.aspx">Views</category><category domain="https://www.infopathdev.com:443/blogs/agni/archive/tags/Performance/default.aspx">Performance</category></item><item><title>Delete File from SharePoint</title><link>https://www.infopathdev.com:443/blogs/agni/archive/2006/03/12/Delete-File-from-SharePoint.aspx</link><pubDate>Mon, 13 Mar 2006 00:04:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:110</guid><dc:creator>Agni Reddy</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;There are times when we want to delete a file in SharePoint. To do this we need to call UpdateListItems web method in the Lists.asmx SharePoint web service. This document goes into the details of how to delete a file present in a form library in SharePoint.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Create InfoPath project:&lt;/strong&gt;&lt;/p&gt;&lt;ol start="1" style="margin-top:0px;margin-bottom:0px;"&gt;&lt;li&gt;Open Visual Studio and create a new InfoPath project. &lt;/li&gt;&lt;li&gt;Copy the following code into a text editor and save it as &lt;strong&gt;UpdateListItemsConfig.xml&lt;/strong&gt;.&lt;/li&gt;&lt;/ol&gt;&lt;p style="padding-left:40px;"&gt;&lt;table class="msoUcTable" style="table-layout:fixed;width:100%;border-collapse:collapse;word-wrap:break-word;border:medium none;"&gt;&lt;tr&gt;&lt;td align="left" style="background-color:#e6e6e6;border:#e6e6e6 6pt solid;"&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&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;UpdateListItemsConfig&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;LibraryName&amp;gt;&lt;font color="#ff0000"&gt;FormLibraryName&lt;/font&gt;&amp;lt;/LibraryName&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;SharepointDelete&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Batch&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Method ID=&amp;quot;1&amp;quot; Cmd=&amp;quot;Delete&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Field Name=&amp;quot;ID&amp;quot;&amp;gt;&amp;lt;/Field&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Field Name=&amp;quot;FileRef&amp;quot;&amp;gt;&amp;lt;/Field&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Method&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Batch&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/SharepointDelete&amp;gt;&lt;br /&gt;&amp;lt;/UpdateListItemsConfig&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;p style="padding-left:40px;"&gt;Change the red text to be the form library name where the file that needs to be deleted is present.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Add the UpdateListItemsConfig.xml&amp;nbsp;as a secondary data connection:&lt;/strong&gt;&lt;/p&gt;&lt;ol start="1" style="margin-top:0px;margin-bottom:0px;"&gt;&lt;li&gt;Choose Data Connections from the Tools menu, and then click Add. &lt;/li&gt;&lt;li&gt;In the Data Connection Wizard, select Receive Data, and then click Next. &lt;/li&gt;&lt;li&gt;Select XML Document, and then click Next. &lt;/li&gt;&lt;li&gt;Click Browse, locate and select the UpdateListItemsConfig.xml file, click Open, and then click Next. &lt;/li&gt;&lt;li&gt;Click Finish, click Yes, and then click Close.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;Take UpdateListItems data connection:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Follow the steps to add the UpdateListItems data connection to delete the file:&lt;/p&gt;&lt;ol start="1" style="margin-top:0px;margin-bottom:0px;"&gt;&lt;li&gt;Go to Tools-&amp;gt;DataConnections and Click on &amp;quot;Add&amp;quot; button. &lt;/li&gt;&lt;li&gt;Select Submit Data and click on &amp;quot;Next&amp;quot; button. &lt;/li&gt;&lt;li&gt;Select WebService and Click on &amp;quot;Next&amp;quot; button. &lt;/li&gt;&lt;li&gt;Enter the Webservice address.&lt;br /&gt;for eg: &lt;em&gt;http://&amp;lt;sharepoint server name&amp;gt;/&amp;lt;subsite name&amp;gt;/_vti_bin/lists.asmx?WSDL&amp;quot;&lt;/em&gt; &lt;/li&gt;&lt;li&gt;Select UpdateListItems and click on next. &lt;/li&gt;&lt;li&gt;By default s0:listName will be selected. &lt;/li&gt;&lt;li&gt;Click on the Modify Icon at the end of Field or group field. &lt;/li&gt;&lt;li&gt;Select UpdateListItemsConfig in the Data source dropdown. &lt;/li&gt;&lt;li&gt;Select LibraryName and Click OK. &lt;/li&gt;&lt;li&gt;Select the Check Box Submit Data as a String.&lt;/li&gt;&lt;/ol&gt;&lt;p style="padding-left:40px;"&gt;&lt;img height="429" src="http://cs.infopathdev.com/photos/blog_pictures/images/108/original.aspx" style="width:606px;height:429px;" width="606" /&gt;&lt;/p&gt;&lt;ol start="11" style="margin-top:0px;margin-bottom:0px;"&gt;&lt;li&gt;Select s0:Updates and click on the Modify Icon at the end of Field or group field. &lt;/li&gt;&lt;li&gt;Select UpdateListItemsConfig in the Data source dropdown. &lt;/li&gt;&lt;li&gt;Select Batch node under SharePointDelete node. &lt;/li&gt;&lt;li&gt;Select XML Subtree, Including selected element as shown in the picture below.&lt;/li&gt;&lt;/ol&gt;&lt;p style="padding-left:40px;"&gt;&lt;img height="429" src="http://cs.infopathdev.com/photos/blog_pictures/images/109/original.aspx" style="width:607px;height:429px;" width="607" /&gt;&lt;/p&gt;&lt;ol start="15" style="margin-top:0px;margin-bottom:0px;"&gt;&lt;li&gt;Click button, enter SharePointDelete as name and Click on Finish.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;Add code to call the SharePointDelete data connection:&lt;/strong&gt;&lt;/p&gt;&lt;ol start="1" style="margin-top:0px;margin-bottom:0px;"&gt;&lt;li&gt;Open the following code into the FormCode.cs:&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p style="padding-left:40px;"&gt;&lt;table class="msoUcTable" style="table-layout:fixed;width:100%;border-collapse:collapse;word-wrap:break-word;border:medium none;"&gt;&lt;tr&gt;&lt;td align="left" style="background-color:#e6e6e6;border:#e6e6e6 6pt solid;"&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" size="2"&gt;private void deleteFile(string fileName)&lt;br /&gt;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; thisXDocument.GetDOM(&amp;quot;UpdateListItemsConfig&amp;quot;).selectSingleNode(&amp;quot;/UpdateListItemsConfig/SharepointDelete/Batch/Method/Field[@Name = &amp;#39;FileRef&amp;#39;]&amp;quot;).text = fileName;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WebServiceAdapter2 deleteFileFromSharepoint = (WebServiceAdapter2)thisXDocument.DataAdapters[&amp;quot;SharePointDelete&amp;quot;];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; deleteFileFromSharepoint.Submit();&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;ol start="2" style="margin-top:0px;margin-bottom:0px;"&gt;&lt;li&gt;Pass the complete filepath to the Method for deleting the File&lt;br /&gt;Ex: &lt;em&gt;http://serverName/sites/SharePointDelete/TestDelete.xml&lt;/em&gt;&lt;/li&gt;&lt;/ol&gt;&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=110" width="1" height="1"&gt;</description></item></channel></rss>