<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.infopathdev.com/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>Web methods</title><link>http://www.infopathdev.com/files/folders/web_methods/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP2 (Build: 20611.960)</generator><item><title>Implement Static and Dynamic queries using QueryDB</title><link>http://www.infopathdev.com/files/folders/web_methods/entry32474.aspx</link><pubDate>Tue, 23 Sep 2008 18:06:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:32474</guid><dc:creator>ErnestoM</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;In the QueryDB User Guide we discussed the possibilities offered by this web service. This document is a tutorial where we illustrate the use of Query Builder in conjunction with QueryDB to create two types of queries: static and dynamic.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Generate queryxml for use with QueryDB&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp;Open InfoPath, select Qdabra Query Builder and click on Fill out this form.&lt;br /&gt;2.&amp;nbsp;In the Data Sources table, enter the root URL to your installation of DBXL in the Web Service URL Prefix field.&lt;br /&gt;3.&amp;nbsp;The Web Service Name field is automatically populated to the default value, which is QdabraWebService. If you have chosen a different value, modify the content of the field.&lt;br /&gt;4.&amp;nbsp;For the InfoPath Form Template field, you only need to attach an InfoPath form if you are going to be using a field from the form to build the query. We will do this in a future example, but for now this can be left blank.&lt;br /&gt;5.&amp;nbsp;If you know it, enter the Database Connection String directly into the field. Alternatively, click on the Construct Now button to display a new section. &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;When using Windows Authentication, you only need to enter two fields:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;i.&amp;nbsp;Enter a Data Source (Server Name). This is the location of your SQL Server.&lt;br /&gt;ii.&amp;nbsp;Enter an Initial Catalog (Database Name). Note that this value will automatically be copied to the next table, Query Parameters.&lt;br /&gt;iii.&amp;nbsp;Click the Done button.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;b.&amp;nbsp;If you select SQL Server Authentication, a new section will open.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;i.&amp;nbsp;Enter a login and a password.&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;
&lt;p&gt;6.&amp;nbsp;In the Query Parameters table:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Provide a Database Name if one was not provided in the connection string in step 5.&lt;br /&gt;b.&amp;nbsp;Enter the Table Name you wish to query.&lt;br /&gt;c.&amp;nbsp;Enter a value for the maxrows parameter in the Max Rows Count field. This will limit the number of rows that are returned by the connection.&lt;br /&gt;d.&amp;nbsp;Check the Distinct checkbox if desired.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;7.&amp;nbsp;In the Query Columns table, click on Insert return column. &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Type in the name of the column. Alternatively, click on the Select Database Column icon. The database structure will open in the taskpane, where you can select the column desired.&lt;br /&gt;b.&amp;nbsp;Repeat as desired, adding the columns you wish to retrieve from the table. For this example, we will only return the ProjectName column.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;8.&amp;nbsp;In the Query Filter table, click on Insert comparison to create a new query filter.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Click on the Select Database Column icon and select a column from the data structure shown in the taskpane. For our example, we will select Client.&lt;br /&gt;b.&amp;nbsp;Select a Comparison Operator from the dropdown. For our example, we will select Equal.&lt;br /&gt;c.&amp;nbsp;In the Value or a column name field, enter Client1.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;9.&amp;nbsp;Click on Insert Logical Operator.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Select the logical operator OR from the dropdown.&lt;br /&gt;b.&amp;nbsp;Now repeat step 8, replacing Client1 with Client2.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;10.&amp;nbsp;In the Query Sort table, click on Insert sort column.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Click on the Select Database Column icon and select a column from the data structure shown in the taskpane. For our example, we will select Actual_length_months.&lt;br /&gt;b.&amp;nbsp;Select a Sort Order from the dropdown, in our case, we opt for Ascending.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;11.&amp;nbsp;Click on the Build Now button to generate the Query Strings. Copy the first two strings into Notepad.&lt;br /&gt;Implement the static query&lt;br /&gt;12.&amp;nbsp;In InfoPath, click on File &amp;gt; Design a Form Template. Select a blank form and click OK.&lt;br /&gt;13.&amp;nbsp;Click on Tools &amp;gt; Data Connections, and in the dialog box, click on Add.&lt;br /&gt;14.&amp;nbsp;The Data Connection Wizard will now be displayed. Select Create a New Connection to &lt;br /&gt;15.&amp;nbsp;and Receive data. Click Next.&lt;br /&gt;16.&amp;nbsp;From the following screen, select Web Service and click Next.&lt;br /&gt;17.&amp;nbsp;Type in the URL for the QueryDB service, &lt;a href="http://%3cserver-name%3e/QdabraWebService/QueryDB.asmx"&gt;http://&amp;lt;server-name&amp;gt;/QdabraWebService/QueryDB.asmx&lt;/a&gt; and click Next.&lt;br /&gt;18.&amp;nbsp;In the following screen, select GetColumnsXMLStrQuery and click Next.&lt;br /&gt;19.&amp;nbsp;Double-click on tns:queryxml and paste the first query that was generated by Query Builder. This is the sample value, used by InfoPath to derive a schema. Click Next.&lt;br /&gt;20.&amp;nbsp;In the following screen, double-click on tns:queryxml and paste the second query that was generated by Query Builder. Click Next twice.&lt;br /&gt;21.&amp;nbsp;Ensure the checkbox for Automatically retrieve data when this form is opened is checked. Ensure the name for this data connection is GetColumnsXMLStrQuery. Click Finish. Click Close.&lt;br /&gt;22.&amp;nbsp;In the right hand pane called Design Tasks, click on Data Source and select GetColumnsXMLStrQuery from the dropdown.&lt;br /&gt;23.&amp;nbsp;Drag the node /dfs:myFields/dfs:dataFields/tns:GetColumnsXMLStrQueryResponse/tns:GetColumnsXMLStrQueryResult/Rows/row&amp;nbsp; and drop it into the form as a Repeating table.&lt;br /&gt;24.&amp;nbsp;Click on File, then Save As, and save the form. &lt;br /&gt;25.&amp;nbsp;Click on Preview. If prompted by a Microsoft InfoPath Security warning, click Yes. This will display the results, listing the projects for Client1 OR Client2, sorted by the Actual_length_month column in ascending order.&lt;/p&gt;
&lt;p&gt;&lt;img style="WIDTH:143px;HEIGHT:137px;" height="137" src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30947/original.aspx" width="143" align="middle" border="1" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Switch to a dynamic query&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;With a few additional steps we can implement a dynamic query that will call QueryDB after a user provides some missing piece of data. First we need to modify the form, then modify the query generated by Query Builder.&lt;/p&gt;
&lt;p&gt;26.&amp;nbsp;Delete the repeating table added to the form in step 14, above.&lt;br /&gt;27.&amp;nbsp;In the Design Tasks taskpane, click on Controls and then click on Text Box. A textbox will appear in the view.&lt;br /&gt;28.&amp;nbsp;Double click on the textbox and change the field name to client. Click OK to close the textbox properties window. Save the form.&lt;br /&gt;29.&amp;nbsp;Switch back to Query Builder and attach the form saved in step 17 to the InfoPath Form Template file attachment control.&lt;br /&gt;30.&amp;nbsp;Clear the Query Filter table by clicking on the down arrow and selecting Remove Logical Operator.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30948/original.aspx" border="1" alt="" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;31.&amp;nbsp;Click on Insert comparison and select the Client column for the Column Name. Leave the Comparison operator set to Equal.&lt;br /&gt;32.&amp;nbsp;For Value or Column Name, click on the Select Schema Node icon and select the client node.&lt;br /&gt;33.&amp;nbsp;Click on Build Now and copy the first two queries into Notepad.&lt;br /&gt;34.&amp;nbsp;Switch back to your form and select Tools &amp;gt; Data Connections. Click Modify for the GetColumnsXMLStrQuery.&lt;br /&gt;35.&amp;nbsp;Click Next twice and you will reach the Set Sample Value window for the Data Connection Wizard. Double-click on tns:queryxml and paste the first query that was generated by Query Builder. Click Next.&lt;br /&gt;36.&amp;nbsp;In the following screen, double-click on tns:queryxml and paste the same (first) query that was generated by Query Builder. Click Next twice.&lt;br /&gt;37.&amp;nbsp;Uncheck the checkbox for Automatically retrieve data when this form is opened and click Finish.&lt;br /&gt;38.&amp;nbsp;In the right hand pane called Design Tasks, click on Data Source and select GetColumnsXMLStrQuery from the dropdown.&lt;br /&gt;39.&amp;nbsp;Drag the node /dfs:myFields/dfs:dataFields/tns:GetColumnsXMLStrQueryResponse/tns:GetColumnsXMLStrQueryResult/Rows/row&amp;nbsp; and drop it into the form as a Repeating table.&lt;br /&gt;40.&amp;nbsp;In the Design Tasks taskpane, click on Controls and then click on Button. A button will appear in the view.&lt;br /&gt;41.&amp;nbsp;Double click on the button and change the label to Query.&lt;br /&gt;42.&amp;nbsp;Click on Rules, then click on Add, and then click on Add Action.&lt;br /&gt;43.&amp;nbsp;Select Set a field’s value from the dropdown.&lt;br /&gt;44.&amp;nbsp;Click on the icon to the right of the Field textbox and select the queryxml node from the GetColumnsXMLStrQuery secondary data connection. Then click OK.&lt;br /&gt;45.&amp;nbsp;Click on the icon to the right of the Value textbox and paste the second query generated by Query Builder. Then click OK twice.&lt;br /&gt;46.&amp;nbsp;Click on Add Action.&lt;br /&gt;47.&amp;nbsp;Select Query using a data connection from the dropdown, making sure that the data connection to GetColumnsXMLStrQuery is selected from the Data connection dropdown, then click OK.&lt;br /&gt;48.&amp;nbsp;Click OK until all dialogs are closed. Save the form and click Preview.&lt;br /&gt;49.&amp;nbsp;Enter a client into the textbox and click the Query button. The results table will show the projects associated with that specific client.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30949/original.aspx" border="1" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Populate a dropdown&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;With a few extra steps we can use the data received from QueryDB populate a dropdown list:&lt;/p&gt;
&lt;p&gt;50.&amp;nbsp;Click on Close Preview to return to design mode for the form.&lt;br /&gt;51.&amp;nbsp;Delete the results repeating table.&lt;br /&gt;52.&amp;nbsp;In the right hand pane called Design Tasks, click on Controls and click on the Drop-Down List Box to get it in to the view.&lt;br /&gt;53.&amp;nbsp;Double click on the drop down to view the properties of the dropdown list.&lt;br /&gt;54.&amp;nbsp;In the properties dialog box, select Look up values from an external data source radio button.&lt;br /&gt;55.&amp;nbsp;Click the button next to the Field or Group text box. The Select a Field or Group dialog will appear.&lt;br /&gt;56.&amp;nbsp;Expand the data source, select the row repeating group and click OK twice.&lt;br /&gt;57.&amp;nbsp;Preview the form. Enter a client into the textbox and click the Query button. The dropdown will load the values pulled down via the QueryDB web service.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30950/original.aspx" border="1" alt="" /&gt;&lt;/p&gt;</description><enclosure url="http://www.infopathdev.com/files/folders/32474/download.aspx" length="114688" type="application/octet-stream" /></item><item><title>How To Call Active Directory Web Service Using Code</title><link>http://www.infopathdev.com/files/folders/web_methods/entry31798.aspx</link><pubDate>Thu, 28 Aug 2008 20:39:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31798</guid><dc:creator>ErnestoM</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Click &lt;strong&gt;Download&lt;/strong&gt;, above, to obtain the C# code that enables you to look up and retrieve information from the GAL.&lt;/p&gt;</description><enclosure url="http://www.infopathdev.com/files/folders/31798/download.aspx" length="37986" type="application/x-zip-compressed" /></item><item><title>Web Service Developer Reference</title><link>http://www.infopathdev.com/files/folders/web_methods/entry31078.aspx</link><pubDate>Thu, 31 Jul 2008 18:05:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31078</guid><dc:creator>ErnestoM</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;This document is meant as an SDK reference for developers that will be integrating DBXL Web Services with their InfoPath forms or any other application. The attached document describes all of the methods in each of the web services.&amp;nbsp; This document is also included in the DBXL v2.2 installer.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Development Tips&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Web Services with Ex Suffix&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;There are two versions of some of the web services, one of which has an “Ex” suffix.&amp;nbsp; These “Ex” APIs differ from their “non-Ex” counterparts only in the way errors are handled.&amp;nbsp; Methods defined in the “Ex” pages return a SoapException when an error occurs.&amp;nbsp; This allows InfoPath’s internal mechanism to detect the error and display an error message.&amp;nbsp; The “non-Ex” methods return a StatusInfo object with a Status node, of value true or false, and error messages.&amp;nbsp; Calling the non-Ex methods requires form logic to check the Success indicator and handle any errors.&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;DbxlSampleDocumentService&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This web service provides identical functionality to the DbxlDocumentService web service, except that everything that it returns is derived from the sampledata.xml file present for the form template of the Document Type queried. This is necessary for InfoPath to derive a schema for the form when there are no documents in the Document Type. Also, when there are documents with varying schemas in a particular Document Type (which is considered bad practice), InfoPath cannot derive a schema for the Content node, regardless.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;References to this web service are automatically redirected to DbxlDocumentService whenever a form is published in DAT.&amp;nbsp; This way, you can develop a form with the Sample Data, but when it is deployed it will use the actual data.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;QdabraDBXL Processing Instruction&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote dir="ltr" style="MARGIN-RIGHT:0px;"&gt;
&lt;p&gt;When resubmitting a Document that has already been assigned a Document ID, the QdabraDBXL Processing Instruction must be present in the XML. DBXL uses this PI to determine whether the Document being submitted is new or existing. If it finds the PI with the attributes specified correctly, then it will move the old version of that Document to the archives, and then insert the new Document.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Use the following example to construct the QdbraDBXL PI. The docid and doctype values should come from those defined in the DBXL Admin Tool.&lt;/p&gt;
&lt;p&gt;&amp;lt;?QdabraDBXL docid=&amp;quot;_int_&amp;quot; doctype=&amp;quot;_doc_type_name_&amp;quot; name=&amp;quot;_meta_data_&amp;quot; author=&amp;quot;_meta_data_&amp;quot; description=&amp;quot;_meta_data_&amp;quot; ?&amp;gt;&lt;/p&gt;
&lt;p&gt;The codeless means to handle the insertion of the QdabraDBXL PI is to open the corresponding Document via Document Linking and Loading.&amp;nbsp; When opening a Document from the web service, the QdabraDBXL PI is automatically injected.&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;There will be certain situations, however, that will require that you use code to inject the QdabraDBXL PI.&amp;nbsp; There are two main scenarios where you will have to programmatically inject the QdabraDBXL PI.&amp;nbsp; The first is when you want to allow users to intermittently save a form as they are filling it out.&amp;nbsp; The second is when developing a catalog-style form, like the QdCatalogBase form.&amp;nbsp; These two situations are covered later, in the Code Samples section.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Code Samples&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It is recommended that you copy-paste the examples below into Visual Studio, as they will be much easier to read in an actual coding environment. These samples were created using Visual Studio 2005 and InfoPath 2003.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Using a Secondary Data Connection setup to Receive Data&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The most common way to interact with the DBXL web services is to receive data from them.&amp;nbsp; The following code sample shows the most common way to do this with code.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;// Retrieve a handle to the secondary data connection. The string passed to GetDOM()&lt;br /&gt;// is the name as for the data connection as defined in the InfoPath Designer.&lt;br /&gt;IXMLDOMDocument3 domGetDocumentsByType = (IXMLDOMDocument3)thisXDocument.GetDOM(&amp;quot;GetDocumentsByType&amp;quot;);&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;// Setup the namespaces for the secondary data connection. For more information, see&lt;br /&gt;// this HowTo: &lt;/em&gt;&lt;a href="http://www.infopathdev.com/blogs/matt/archive/2006/02/02/Setup-Namespaces-for-a-Secondary-Data-Source.aspx"&gt;&lt;em&gt;http://www.infopathdev.com/blogs/matt/archive/2006/02/02/Setup-Namespaces-for-a-Secondary-Data-Source.aspx&lt;/em&gt;&lt;/a&gt;&lt;br /&gt;&lt;em&gt;domGetDocumentsByType.setProperty(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;SelectionNamespaces&amp;quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot; xmlns:my=\&amp;quot;&lt;/em&gt;&lt;a href="http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-02-01T19-18-48/"&gt;&lt;em&gt;http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-02-01T19-18-48\&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&amp;quot; &amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + &amp;quot; xmlns:dfs=\&amp;quot;&lt;/em&gt;&lt;a href="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution/"&gt;&lt;em&gt;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution\&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&amp;quot; &amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + &amp;quot; xmlns:ns4=\&amp;quot;&lt;/em&gt;&lt;a href="http://qdabra.com/webservices//"&gt;&lt;em&gt;http://qdabra.com/webservices/\&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&amp;quot; &amp;quot;);&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;// Change the value of a parameter&lt;br /&gt;domGetDocumentsByType.selectSingleNode(&amp;quot;/dfs:myFields/dfs:queryFields/ns4:GetDocumentsByType/ns4:docTypeName&amp;quot;).text = &amp;quot;PT_Timecard&amp;quot;;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;// Query the web service, which will use the new parameter value as defined above&lt;br /&gt;WebServiceAdapter2 wsaGetDocumentsByType = (WebServiceAdapter2)thisXDocument.DataAdapters[&amp;quot;GetDocumentsByType&amp;quot;];&lt;br /&gt;wsaGetDocumentsByType.Query();&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;// Make sure the method invocation was successful&lt;br /&gt;string success = domGetDocumentsByType.selectSingleNode(&amp;quot;/dfs:myFields/dfs:dataFields/ns4:GetDocumentsByTypeResponse/ns4:GetDocumentsByTypeResult/ns4:Success&amp;quot;).text;&lt;br /&gt;if (success != &amp;quot;true&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new Exception(&amp;quot;Call to GetDocumentsByType failed.&amp;quot;);&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;// Get values from the returned set&lt;br /&gt;string docId = domGetDocumentsByType.selectSingleNode(&amp;quot;/dfs:myFields/dfs:dataFields/ns4:GetDocumentsByTypeResponse/ns4:docInfos/ns4:DocumentInfo/ns4:DocID&amp;quot;).text;&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Calling SubmitDocument setup as a Receive Data Connection&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;There are two ways to submit documents into DBXL.&amp;nbsp; The way that is documented in the Getting Started and other documents is to add a secondary data connection that is setup to Submit Data, but there will be situations (such as creating a catalog-type form) where you will want to programmatically work with the SubmitDocument web method.&amp;nbsp; If you setup this web method as a &amp;quot;submit data&amp;quot; connection then it is very difficult to work with in code.&amp;nbsp; The below code sample demonstrates how to use a SubmitDocument data connection as a &amp;quot;receive data&amp;quot; connection.&amp;nbsp; The XML that is assigned to the xml parameter is trivial in this example, but when developing forms it will contain the entire XML of the form to be submitted.&amp;nbsp; If it is a new document, it will not have the QdabraDBXL Processing Instructions, but if it is an update of a form that already has a Document ID, then the QdabraDBXL PI should be added to the top of the submitted XML.&lt;/p&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;// Retrieve a handle to the secondary data connection.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;IXMLDOMDocument3 domSubmitDocument = (IXMLDOMDocument3)thisXDocument.GetDOM(&amp;quot;SubmitDocument&amp;quot;);&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;// Setup namespaces&lt;br /&gt;domSubmitDocument.setProperty(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;SelectionNamespaces&amp;quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot; xmlns:my=\&amp;quot;&lt;/em&gt;&lt;a href="http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-02-01T19-18-48/"&gt;&lt;em&gt;http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-02-01T19-18-48\&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&amp;quot; &amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + &amp;quot; xmlns:dfs=\&amp;quot;&lt;/em&gt;&lt;a href="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution/"&gt;&lt;em&gt;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution\&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&amp;quot; &amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + &amp;quot;&amp;nbsp; xmlns:ns4=\&amp;quot;&lt;/em&gt;&lt;a href="http://qdabra.com/webservices//"&gt;&lt;em&gt;http://qdabra.com/webservices/\&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&amp;quot; &amp;quot;);&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;// Alter the query parameter values&lt;br /&gt;domSubmitDocument.selectSingleNode(&amp;quot;/dfs:myFields/dfs:queryFields/ns4:SubmitDocument/ns4:docTypeName&amp;quot;) .text = &amp;quot;PT_Timecard&amp;quot;;&lt;br /&gt;domSubmitDocument.selectSingleNode(&amp;quot;/dfs:myFields/dfs:queryFields/ns4:SubmitDocument/ns4:xml&amp;quot;).text = &amp;quot;&amp;lt;?QdabraDBXL docId=’3’ ?&amp;gt;&amp;lt;Root&amp;gt;&amp;lt;a&amp;gt;hello&amp;lt;/a&amp;gt;&amp;lt;b&amp;gt;&amp;lt;c&amp;gt;1&amp;lt;/c&amp;gt;&amp;lt;c&amp;gt;2&amp;lt;/c&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;/Root&amp;gt;&amp;quot;;&lt;br /&gt;domSubmitDocument.selectSingleNode(&amp;quot;/dfs:myFields/dfs:queryFields/ns4:SubmitDocument/ns4:name&amp;quot;).text = &amp;quot;Matt&amp;quot;;&lt;br /&gt;domSubmitDocument.selectSingleNode(&amp;quot;/dfs:myFields/dfs:queryFields/ns4:SubmitDocument/ns4:author&amp;quot;).text = &amp;quot;Matt&amp;quot;;&lt;br /&gt;domSubmitDocument.selectSingleNode(&amp;quot;/dfs:myFields/dfs:queryFields/ns4:SubmitDocument/ns4:description&amp;quot;).text = &amp;quot;Latest timecard.&amp;quot;;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;// Query the web service&lt;br /&gt;WebServiceAdapter2 wsaSubmitDocument = (WebServiceAdapter2)thisXDocument.DataAdapters[&amp;quot;SubmitDocument&amp;quot;];&lt;br /&gt;wsaSubmitDocument.Query();&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Working with a Secondary Data Connection setup to Submit Data&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;When a secondary data connection is set up to submit data, the object model only supports a limited amount of access. The submission process can be initiated, and then the results can be viewed, but other than that there is not much else available.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;// Submit the data connection as defined in the Data Connection wizard&lt;br /&gt;WebServiceAdapter2 wsaSubmit = (WebServiceAdapter2)thisXDocument.DataAdapters[&amp;quot;Submit&amp;quot;];&lt;br /&gt;wsaSubmit.Submit();&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;// Inspect what was returned by the submit&lt;br /&gt;IXMLDOMDocument2 domSubmitOutput = (IXMLDOMDocument2)thisXDocument.CreateDOM();&lt;br /&gt;domSubmitOutput.async = false;&lt;br /&gt;domSubmitOutput.validateOnParse = false;&lt;br /&gt;domSubmitOutput.loadXML(wsaSubmit.OutputLocation.xml);&lt;br /&gt;domSubmitOutput.setProperty( &amp;quot;SelectionNamespaces&amp;quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot; xmlns:dfs=\&amp;quot;&lt;/em&gt;&lt;a href="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution/"&gt;&lt;em&gt;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution\&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&amp;quot; &amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + &amp;quot;&amp;nbsp; xmlns:ns4=\&amp;quot;&lt;/em&gt;&lt;a href="http://qdabra.com/webservices//"&gt;&lt;em&gt;http://qdabra.com/webservices/\&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&amp;quot; &amp;quot;);&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;string submitSuccess = domSubmitOutput.selectSingleNode( &amp;quot;/dfs:dataFields/ns4:SubmitDocumentResponse/ns4:SubmitDocumentResult/ns4:Success&amp;quot;).text;&lt;br /&gt;thisXDocument.UI.Alert( submitSuccess );&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Adding Exception Handling when Working with Ex methods&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;When using the Ex web methods, adding exception handling will allow you to handle exceptions gracefully when they are returned from the web service.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;// Submit the data connection as defined in the Data Connection wizard&lt;br /&gt;WebServiceAdapter2 wsaSubmit = (WebServiceAdapter2)thisXDocument.DataAdapters[&amp;quot;SubmitEx&amp;quot;];&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; wsaSubmit.Submit();&lt;br /&gt;}&lt;br /&gt;catch (Exception ex)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; thisXDocument.UI.Alert(&amp;quot;SubmitEx method failed. &amp;quot; + ex.Message);&lt;br /&gt;}&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Client-side Injection of the QdabraDBXL Processing Instruction&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The normal scenario when working with DBXL enabled forms is to open the form template, fill out the form, submit to DBXL, and then immediately close the form.&amp;nbsp; If updates need to be made, the form is reopened from the web service (which injects the QdabraDBXL PI), edited, and then resubmitted.&amp;nbsp; However, it is not always desirable to close the form after initial submission, and then reopen.&amp;nbsp; To remedy this, you can inject the QdabraDBXL PI on the client with code.&amp;nbsp; When doing this, it is best practice to also set the dirty flag to false immediately after a successful submission to the web service so that the user is not confused when they try to close the form and are prompted to save their form, even though it has been successfully saved to the DBXL web service.&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp;Open the template.xml file for the form template you are developing.&lt;br /&gt;2.&amp;nbsp;At the very top of the XML, insert a blank QdabraDBXL PI between the other PIs and the root node of the form.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&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;?mso-infoPathSolution name=&amp;quot;urn:schemas-microsoft-com:office:infopath:ProjectTracker_Timecard:-myXSD-2006-06-09T06-04-22&amp;quot; href=&amp;quot;manifest.xsf&amp;quot; mce_href=&amp;quot;manifest.xsf&amp;quot; solutionVersion=&amp;quot;1.0.0.881&amp;quot; productVersion=&amp;quot;11.0.6565&amp;quot; PIVersion=&amp;quot;1.0.0.0&amp;quot; ?&amp;gt;&lt;br /&gt;&amp;lt;?mso-application progid=&amp;quot;InfoPath.Document&amp;quot;?&amp;gt;&lt;br /&gt;&amp;lt;?QdabraDBXL?&amp;gt;&lt;br /&gt;&amp;lt;my:Timecard&amp;gt;&amp;lt;!-- omitted --&amp;gt;&amp;lt;/my:Timecard&amp;gt;&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;3.&amp;nbsp;In the code that handles the submission of the form to the web service, add code that updates the PI of the current form to include the docId.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;WebServiceAdapter2 wsAdapter = (WebServiceAdapter2)thisXDocument.DataAdapters[&amp;quot;SubmitDocument&amp;quot;];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; wsAdapter.Submit();&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; string docId = wsAdapter.OutputLocation.selectSingleNode(&amp;quot;//ns2:docId&amp;quot;).text;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; thisXDocument.DOM.selectSingleNode(String.Format(&amp;quot;/processing-instruction()[local-name(.) = &amp;#39;{0}&amp;#39;]&amp;quot;, &amp;quot;QdabraDBXL&amp;quot;)).text = String.Format(&amp;quot; docid=\&amp;quot;{0}\&amp;quot;&amp;quot;, docId);&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Make sure the user does not see the save dialog when closing the form&lt;br /&gt;&amp;nbsp;&amp;nbsp; thisXDocument.SetDirty(false);&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;
&lt;p&gt;To view the detailed description of each web method, please &lt;a class="" href="http://www.infopathdev.com/files/folders/31078/download.aspx"&gt;download the attached Word Document&lt;/a&gt;.&lt;/p&gt;</description><enclosure url="http://www.infopathdev.com/files/folders/31078/download.aspx" length="230912" type="application/msword" /></item><item><title>QueryDB User Manual</title><link>http://www.infopathdev.com/files/folders/web_methods/entry30952.aspx</link><pubDate>Mon, 28 Jul 2008 18:51:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:30952</guid><dc:creator>ErnestoM</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;This is the User Manual for the QueryDB web service. The document explains the operations available, as well as the possible filtering and sorting operations.&lt;/p&gt;
&lt;p&gt;Note that all of the examples in this document will derive their data from the table in Figure 1.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30912/original.aspx" alt="" /&gt;&lt;br /&gt;&lt;em&gt;Figure 1&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Configuration&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Before you can begin using QueryDB to query a SQL database, the database being queried needs to be added to the configuration/qdabra.dbxl/enumdb/databases node in web.config. The SQL server indicated during installation (where QdabraDBXL and QdabraSamples are located) is already configured to use QueryDB, but any additional databases must be added individually, like this: &amp;lt;database alias=&amp;quot;DB_Alias&amp;quot; name=&amp;quot;SampleDB&amp;quot; server=&amp;quot;default&amp;quot; /&amp;gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Accessing a remote database&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In order to allow QueryDB to access a database that lies on a different server, you must add server and database aliases to the web.config file. Look for instructions within the configuration/qdabra.dbxl/enumdb/servers and configuration/qdabra.dbxl/enumdb/databases nodes.&amp;nbsp;&lt;/p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30951/original.aspx" alt="" /&gt; 
&lt;p&gt;The database alias must be placed within pound signs when using QueryBuilder to build the queryxml. Note that you must also provide the requester machine read access in the remote database.&lt;br /&gt;&amp;nbsp; &lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;QueryDB methods&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;There are four methods within QueryDB, each of them allowing the user to query the database in different ways. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1.&amp;nbsp;GetColumnsXMLStrQuery&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;GetColumnsXMLStrQuery returns an array of all columns of the specified rows of the specified table. The user must provide an xml query, generated by Qdabra’a Query Builder, which details database, table, retrieved columns, sorting and filtering.&lt;/p&gt;
&lt;p&gt;Depending on the query generated by Query Builder, the user can enable rules within the form in order to use runtime data to affect the query. Of course the simple scenario is also possible, where Query Builder generates a static xml query.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2.&amp;nbsp;GetDropdownEntries&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;GetDropdownEntries allows a user to retrieve a list of values and easily bind them to a dropdown control. The user must provide values for database, table and valueColumn. By default, the values will be sorted according to valueColumn in ascending order, or by displayColumn if provided. Besides the optional displayColumn, the user can also indicate sortOrder (ascending or descending) and a filterXML. Here is the full information regarding the parameters:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30914/original.aspx" alt="" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To illustrate the use of this method, we will query our sample data to list the ProjectName column, sorted by Estimated_length_months in descending order. The parameters required for this operation are seen in Figure 2 and result of that query is seen below, in Figure 3. Note that if no sortColumn and no sortOrder are provided, the method will automatically sort by valueColumn, ascending.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30913/original.aspx" alt="" /&gt;&lt;br /&gt;&lt;em&gt;Figure 2&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30915/original.aspx" alt="" /&gt;&lt;br /&gt;&lt;em&gt;Figure 3&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The filtering parameter, filterXML, will be discussed later on in this document. Note that, because this method accepts parameters for sorting in the Data Connection Wizard, the user must not use a sorting operation within the filterXML.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3.&amp;nbsp;GetColumnsXMLQuery &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;GetColumnsXmlQuery is meant for use in code exclusively and behaves in the same way as GetColumnsXmlStrQuery.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4.&amp;nbsp;DescribeDatabaseSchema&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;DescribeDatabaseSchema scans the schema in the specified connection string and returns an XML Document describing it. The dataSource parameter should be a connection string as passed to the SqlConnection constructor the .NET framework.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;XML Query&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;When using GetColumnsXMLStrQuery, the user can perform fine-grained filtering by using a XML Query, which will have the following format:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30929/original.aspx" alt="" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The simplest query that can be used is one that will pull down an entire table from a given database. The format for this query is &amp;lt;query database=&amp;#39;&amp;lt;database name&amp;gt;&amp;#39; table=&amp;#39;&amp;lt;table name&amp;gt;&amp;#39;&amp;gt;&amp;lt;/query&amp;gt; and the result is seen in Figure 4.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30930/original.aspx" alt="" /&gt;&lt;br /&gt;&lt;em&gt;Figure 4&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;While more fine-grained xml queries can be generated manually, Qdabra provides the Query Builder tool, which allows the user to easily generate a desired xml query. The Query Builder tool will be discussed in an upcoming section.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;maxrows&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The maxrows parameter allows the user to limit the number of rows that are returned by the query. This is especially useful when a query might return a large amount of results. The format used for this is &amp;lt;query maxrows=’x’&amp;gt;, where x is the number of rows to be returned.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Filtering&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;There are various types of comparison operations available for the &amp;lt;filter&amp;gt; node of queryXML.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;a.&amp;nbsp;Comparison operators: lt, le, eq, ne, ge, gt&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The first set of comparison operators -namely &amp;lt;lt&amp;gt;, &amp;lt;le&amp;gt;, &amp;lt;eq&amp;gt;, &amp;lt;ne&amp;gt;, &amp;lt;ge&amp;gt; and &amp;lt;gt&amp;gt;- all use similar formats. The comparisons can take place between a column and a value, or between a column and another column. The examples below will illustrate some of the uses of these operators. Each sample will be accompanied by a table showing the result.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;em&gt;&amp;nbsp;&amp;lt;lt&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;!—- lt stands for “less than”. In the example&lt;br /&gt;below we compare a column and a value. --&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;column name=&amp;quot;Actual_length_months&amp;quot;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;value type=&amp;quot;int&amp;quot;&amp;gt;12&amp;lt;/value&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/lt&amp;gt;&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30931/original.aspx" alt="" /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;em&gt;&amp;nbsp;&amp;lt;le&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;!—- le stands for “less than or equal”. In the&lt;br /&gt;example below we compare a columns and a value. --&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;column name=&amp;quot;Actual_length_months&amp;quot;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;value type=&amp;quot;int&amp;quot;&amp;gt;18&amp;lt;/value&amp;gt;&lt;br /&gt;&amp;lt;/le&amp;gt;&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30932/original.aspx" alt="" /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;lt;eq&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;!—- eq stands for “equal”. In the example below&lt;br /&gt;we compare two columns. --&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;column name=&amp;quot;Actual_length_months&amp;quot;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;column name=&amp;quot;Estimated_length_months&amp;quot;/&amp;gt;&lt;br /&gt;&amp;lt;/eq&amp;gt;&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30933/original.aspx" alt="" /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;lt;ne&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;!—- ne stands for “not equal”. In the example&lt;br /&gt;below we compare a column and an alphanumeric value. --&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;column name=&amp;quot;Client&amp;quot;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;value type=&amp;quot;varchar&amp;quot;&amp;gt;Client1&amp;lt;/value&amp;gt;&lt;br /&gt;&amp;lt;/ne&amp;gt;&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30934/original.aspx" alt="" /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;lt;ge&amp;gt;&lt;br /&gt;&amp;lt;!-- ge stands for “greater than or equal”. In&lt;br /&gt;the example below we compare a column and a value. --&amp;gt;&lt;br /&gt;&amp;lt;column name=&amp;quot; Actual_length_months&amp;quot;/&amp;gt;&lt;br /&gt;&amp;lt;value type=&amp;quot;int&amp;quot;&amp;gt;12&amp;lt;/value&amp;gt;&lt;br /&gt;&amp;lt;/ge&amp;gt;&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30935/original.aspx" alt="" /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;lt;gt&amp;gt;&lt;br /&gt;&amp;lt;!-- gt stands for “greater than”. In the example&lt;br /&gt;below we compare a column and a value. --&amp;gt;&lt;br /&gt;&amp;lt;column name=&amp;quot; Actual_length_months&amp;quot;/&amp;gt;&lt;br /&gt;&amp;lt;value type=&amp;quot;int&amp;quot;&amp;gt;18&amp;lt;/value&amp;gt;&lt;br /&gt;&amp;lt;/gt&amp;gt;&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30936/original.aspx" alt="" /&gt;&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;b.&amp;nbsp;Comparison operator: in&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The use of &amp;lt;in&amp;gt; is slightly different from the above set of comparison operators. This operator requires the user to specify a column and at least one value. It then selects rows that contain the value(s) listed in the specified column.&lt;/p&gt;
&lt;p&gt;The following example illustrates the XML query when using &amp;lt;in&amp;gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;lt;in&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;column name=&amp;quot;Client&amp;quot;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;values&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;value&amp;gt;Client1&amp;lt;/value&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;value&amp;gt;Client2&amp;lt;/value&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;value&amp;gt;Client3&amp;lt;/value&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/values&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/in&amp;gt;&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30937/original.aspx" alt="" /&gt;&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;c.&amp;nbsp;NULL values&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;One useful and common filtering operation involves the search for NULL values in your database. In order to do this, we will need to use &amp;lt;ne&amp;gt; and &amp;lt;eq&amp;gt;.&lt;/p&gt;
&lt;p&gt;NULL values can be excluded, as shown below:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;lt;ne&amp;gt;&lt;br /&gt;&amp;lt;column name=&amp;quot;Client&amp;quot;/&amp;gt;&lt;br /&gt;&amp;lt;value nil=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;&amp;lt;/ne&amp;gt;&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30938/original.aspx" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;NULL values can also be included:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;lt;eq&amp;gt;&lt;br /&gt;&amp;lt;column name=&amp;quot;Client&amp;quot;/&amp;gt;&lt;br /&gt;&amp;lt;value nil=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;&amp;lt;/eq&amp;gt;&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30939/original.aspx" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;d.&amp;nbsp;Using LIKE and wildcards&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The &amp;lt;like&amp;gt; filter can search for patterns in the data columns by using wildcard characters:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;lt;like&amp;gt;&lt;br /&gt;&amp;lt;column name=&amp;quot;ColumnName&amp;quot;/&amp;gt;&lt;br /&gt;&amp;lt;value&amp;gt;Pattern&amp;lt;/value&amp;gt;&lt;br /&gt;&amp;lt;/like&amp;gt;&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;‘Pattern’ is the specific string of characters to search for in the column “ColumnName” and can include the following four wildcard characters.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;% will search for any string of characters. For example, the pattern %1 will yield the following result:&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30940/original.aspx" alt="" /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A pattern consisting only of % will yield all results in the queried table.&lt;/li&gt;
&lt;li&gt;An underscore (_) represents any single character. The example below shows the result obtained if we filter using ‘Project_’.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30941/original.aspx" alt="" /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The square brackets can denote any single character within the specified range. For example, we can search based on a set; [1-3] would be equivalent to [123]. When the pattern is %[1-2] we will obtain all Client entries that send with the numbers 1 or 2.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30942/original.aspx" alt="" /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The square brackets in combination with the carrot (^) will allow the user to search for any single character not within the specified range. To illustrate this, we implement the opposite filter (&amp;lt;value&amp;gt;%[^1-2]&amp;lt;/value&amp;gt;) to the one shown above.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30943/original.aspx" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;e.&amp;nbsp;Using CONTAINS&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The &amp;lt;contains&amp;gt; filter allows you to perform keyword searches in your database, in the same way you should use it in a SQL statement (see &lt;a href="http://msdn2.microsoft.com/en-us/library/ms187787.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms187787.aspx&lt;/a&gt;). You cannot use &amp;lt;contains&amp;gt; on columns that are not full-text indexed.&amp;nbsp; Full text searches using allow you to also use the NEAR operation, as well as searching for phrases enclosed between double quotes, and wildcards (*) for prefix searches.&lt;/p&gt;
&lt;p&gt;Finally, note that performing OR/AND operations within a &amp;lt;contains&amp;gt; filter produces better performance than performing the same operation across two filters. For example, we will obtain the same result with either of the filtering operations below, but the first will give you better performance.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Option 1:&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;lt;or&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;contains&amp;gt;&lt;br /&gt;&amp;lt;column name=&amp;quot;Client&amp;quot;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;value&amp;gt;Client1&amp;lt;/value&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/contains&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;contains&amp;gt;&lt;br /&gt;&amp;lt;column name=&amp;quot;Client&amp;quot;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;value&amp;gt;Client2&amp;lt;/value&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/contains&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/or&amp;gt;&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;em&gt;Option 2:&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;lt;contains&amp;gt;&lt;br /&gt;&amp;lt;column name=&amp;quot;Client&amp;quot;/&amp;gt;&lt;br /&gt;&amp;lt;value&amp;gt;Client1 OR Client2&amp;lt;/value&amp;gt;&lt;br /&gt;&amp;lt;/contains&amp;gt;&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Sorting&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;QueryDB’s GetColumnsXMLQuery and GetColumnsXMLStrQuery allow users to sort the results. When using multiple entries, the results will be sorted by each of the columns listed, in the order listed. Sorting by:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;nbsp;&amp;lt;sort&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;column name=&amp;quot;Actual_length_months&amp;quot; order=&amp;quot;ASC&amp;quot;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;column name=&amp;quot;Estimated_length_months&amp;quot; order=&amp;quot;ASC&amp;quot;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;/sort&amp;gt;&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Yields:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30944/original.aspx" alt="" /&gt;&lt;/p&gt;&lt;/blockquote&gt;</description><enclosure url="http://www.infopathdev.com/files/folders/30952/download.aspx" length="254464" type="application/octet-stream" /></item><item><title>Using DBXL Resources</title><link>http://www.infopathdev.com/files/folders/web_methods/entry30829.aspx</link><pubDate>Thu, 24 Jul 2008 23:24:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:30829</guid><dc:creator>ErnestoM</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;The DBXLResource API allows users to use custom XML in their DBXL Document Type Configurations. As explained in the scenarios below, this grants the user to customization flexibility. The scenarios explain situations in which the administrator sets and controls the XML and situations in which the users are allowed to customize their XML resource. &lt;/p&gt;
&lt;p&gt;In default DBXL v2.2 installations, the methods can be found in &lt;a href="http://%3cservername%3e/QdabraWebService/DBXLResource.asmx"&gt;http://&amp;lt;servername&amp;gt;/QdabraWebService/DBXLResource.asmx&lt;/a&gt;. Note that users must have DocType Level Admin permissions to create, modify and delete resources.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;SampleData&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The following table shows the sample data that will be used throughout the scenarios in this document.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30818/original.aspx" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Scenario 1: Resource uses an existing doc id&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In this scenario, an administrator creates two DocTypes, where one will manage settings for the other. The settings will apply to all users; therefore, AllowUserVersions will be set to False. This set up is useful for server migrations, when DocIDs are likely to change. Instead of hard coding the DocID value into the InfoPath form, the resource will allow the user to change the DocID, as necessary, using ModifyResource.&lt;/p&gt;
&lt;p&gt;Follow these steps to set up this scenario.&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp;Create the Configuration Document Type&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a)&amp;nbsp;Create a new, blank InfoPath form.&lt;br /&gt;b)&amp;nbsp;In the Design Tasks taskpane, click on Controls, then click on Multiple-Selection List Box.&lt;br /&gt;c)&amp;nbsp;Double-click on the control that was inserted in the view and change the Field name to projects.&lt;br /&gt;d)&amp;nbsp;In the List box entries section, select Look up values from an external data source and click Add. This will open the Data Connection Wizard.&lt;br /&gt;e)&amp;nbsp;In the first screen, the new connection will automatically be set to receive data. Click Next.&lt;br /&gt;f)&amp;nbsp;Select Web Service and click Next.&lt;br /&gt;g)&amp;nbsp;Enter the URL of the QueryDB service, which in default installations is &lt;a href="http://%3cservername%3e/QdabraWebService/QueryDB.asmx"&gt;http://&amp;lt;servername&amp;gt;/QdabraWebService/QueryDB.asmx&lt;/a&gt;. Click Next.&lt;br /&gt;h)&amp;nbsp;Select GetDropdownEntries and click Next.&lt;br /&gt;i)&amp;nbsp;Enter the parameters for your data connection. In our example, they can be seen in the screenshot shown in Figure 1. &lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30819/original.aspx" alt="" /&gt;&lt;br /&gt;&lt;em&gt;Figure 1&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;j)&amp;nbsp;When done, click Next twice, then click Finish, making sure that the checkbox for Automatically retrieve data when form is opened is checked.&lt;br /&gt;k)&amp;nbsp;Click the Select Xpath button to the right of the Entries field.&lt;br /&gt;l)&amp;nbsp;Expand the nodes and select the GetDropdownEntries/entry node. Click OK.&lt;br /&gt;m)&amp;nbsp;Click the Select Xpath button to the right of the Display name field, select the display node and click OK.&lt;br /&gt;n)&amp;nbsp;Click OK to exit the Multiple-Selection List Box properties screen.&lt;br /&gt;o)&amp;nbsp;Create a button that submits the form to DBXL. For instructions on doing this, see the document called &amp;lt;TITLE AND LINK HERE&amp;gt;.&lt;br /&gt;p)&amp;nbsp;Click on File &amp;gt; Save As and save the form to a local folder. For the purposes of this example, we are naming the form Config-Scenario1.xsn. A preview of the form might look as seen in Figure 2.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30820/original.aspx" alt="" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2.&amp;nbsp;Create the Target Document Type&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a)&amp;nbsp;Right click on the projects control and select Change to &amp;gt; More.&lt;br /&gt;b)&amp;nbsp;Select Drop-down List Box and click OK.&lt;br /&gt;c)&amp;nbsp;Click on File &amp;gt; Save As and save the form to a local folder. For the purposes of this example, we are naming the form Target-Scenario1.xsn.&lt;br /&gt;d)&amp;nbsp;Close InfoPath.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;3.&amp;nbsp;Create the configurations in DAT&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a)&amp;nbsp;Open the DBXL Administration Tool, which in default installations of DBXL is located in &lt;a href="http://%3cservername%3e/QdabraWebService/Forms/DAT/template.xsn"&gt;http://&amp;lt;servername&amp;gt;/QdabraWebService/Forms/DAT/template.xsn&lt;/a&gt;.&lt;br /&gt;b)&amp;nbsp;Click on New Configuration.&lt;br /&gt;c)&amp;nbsp;Attach Config-Scenario1.xsn in the InfoPath Form Template field.&lt;br /&gt;d)&amp;nbsp;Name this ConfigDocType-Scenario1 and click Save. Click OK in the confirmation message, then click on Catalog.&lt;br /&gt;e)&amp;nbsp;Click on New Configuration.&lt;br /&gt;f)&amp;nbsp;Attach Target-Scenario1.xsn in the InfoPath Form Template field.&lt;br /&gt;g)&amp;nbsp;Name this TargetDocType-Scenario1 and click Save. Click OK in the confirmation message, then click on Catalog.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;4.&amp;nbsp;Add a document to the ConfigDocType&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a)&amp;nbsp;Click on the Open icon for ConfigDocType-Scenario1.&lt;br /&gt;b)&amp;nbsp;Check the boxes for projects number 1, 3 and 5.&lt;br /&gt;c)&amp;nbsp;Click Submit and then close the form.&lt;br /&gt;d)&amp;nbsp;In DAT, click Edit for ConfigDocType-Scenario1 and then click on the Documents tab.&lt;br /&gt;e)&amp;nbsp;Note the DocID of the document submitted. We will use this in the next step.&lt;br /&gt;5.&amp;nbsp;Create the resource&lt;br /&gt;a)&amp;nbsp;Create a new, blank form in InfoPath.&lt;br /&gt;b)&amp;nbsp;Click on Tools &amp;gt; Data Connection, and then click Add.&lt;br /&gt;c)&amp;nbsp;Select Receive Data and click Next. Then select Web Service and click Next.&lt;br /&gt;d)&amp;nbsp;Enter the URL of the Resource service, which in default installations is &lt;a href="http://%3cservername%3e/QdabraWebService/DBXLResource.asmx"&gt;http://&amp;lt;servername&amp;gt;/QdabraWebService/DBXLResource.asmx&lt;/a&gt;. Click Next.&lt;br /&gt;e)&amp;nbsp;Select CreateResource and click Next.&lt;br /&gt;f)&amp;nbsp;Enter the parameters as seen in Figure 3, noting that the value for DocID may vary.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30821/original.aspx" alt="" /&gt;&lt;br /&gt;&lt;em&gt;Figure 3&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;g)&amp;nbsp;Click Next twice, then click on Finish and Close to exit.&lt;br /&gt;h)&amp;nbsp;To see the result of the query drag the Success node, /dfs:myFields/dfs:dataFields/tns:CreateResourceResponse/tns:CreateResourceResult/tns:Success, into the view.&lt;br /&gt;i)&amp;nbsp;Click Preview to execute the query. You will see the Success checkbox shown as checked. This means the resource has been successfully created. You can now close this form without saving.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;6.&amp;nbsp;Modify the TargetDocType to use the resource&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a)&amp;nbsp;Open the form TargetDocType-Scenario1.xsn in Design mode in InfoPath.&lt;br /&gt;b)&amp;nbsp;Double-click on the projects dropdown control in the view.&lt;br /&gt;c)&amp;nbsp;In the List box entries section, select Look up values from an external data source.&lt;br /&gt;d)&amp;nbsp;Click on Add. This will open the Data Connection Wizard.&lt;br /&gt;e)&amp;nbsp;In the first screen, the new connection will automatically be set to receive data. Click Next.&lt;br /&gt;f)&amp;nbsp;Select Web Service and click Next.&lt;br /&gt;g)&amp;nbsp;Enter the URL of the DBXLResource service and click Next.&lt;br /&gt;h)&amp;nbsp;Select GetResourceXml and click Next.&lt;br /&gt;i)&amp;nbsp;Enter the docTypeName and resourceName parameters and click Next. These must match the settings in Figure 3. You will be asked again to enter the same parameters.&lt;br /&gt;j)&amp;nbsp;Click Next, then click Finish, making sure that the checkbox for Automatically retrieve data when form is opened is checked.&lt;br /&gt;k)&amp;nbsp;In the Data Source dropdown, change the selection to GetDropdownEntries.&lt;br /&gt;l)&amp;nbsp;Click the Select Xpath button to the right of the Entries field.&lt;br /&gt;m)&amp;nbsp;Expand the nodes and select the /dfs:myFields/dfs:dataFields/tns:GetDropdownEntriesResponse/tns:GetDropdownEntriesResult/tns:entry node.&lt;br /&gt;n)&amp;nbsp;Click on Filter Data, then click on Add.&lt;br /&gt;o)&amp;nbsp;In the first dropdown, choose Select a field or group, then select the /dfs:myFields/dfs:dataFields/tns:GetDropdownEntriesResponse/tns:GetDropdownEntriesResult/tns:entry/@value node.&lt;br /&gt;p)&amp;nbsp;In the middle dropdown, leave the selection as is equal to.&lt;br /&gt;q)&amp;nbsp;In the third dropdown, choose Select a field or group.&lt;br /&gt;r)&amp;nbsp;Change the Data Source to GetResourceXml and select the /dfs:myFields/dfs:dataFields/ns1:GetResourceXmlResponse/ns1:resourceXml/my:myFields/my:group1/my:projects node, as seen in Figure 3. Click OK three times.&lt;br /&gt;s)&amp;nbsp;Click the Select Xpath button to the right of the Display name field.&lt;br /&gt;t)&amp;nbsp;Select the display node and click OK twice.&lt;br /&gt;u)&amp;nbsp;Save and close the form.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;7.&amp;nbsp;Verify the result&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a)&amp;nbsp;In Catalog view in DAT, click to Edit the TargetDocType-Scenario1.&lt;br /&gt;b)&amp;nbsp;Attach the updated Target-Scenario1.xsn and click Save. Click OK in the confirmation message, then click on Catalog.&lt;br /&gt;c)&amp;nbsp;Click on the Open icon for TargetDocType-Scenario1. &lt;br /&gt;d)&amp;nbsp;The form will open and the dropdown will only show the three projects selected in the ConfigDocType-Scenario1, as seen in Figure 4.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30822/original.aspx" alt="" /&gt;&lt;br /&gt;&lt;em&gt;Figure 4&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;To modify the resource, we can use ModifyResource. Here is an example.&lt;/p&gt;
&lt;p&gt;8.&amp;nbsp;Add a second document to the ConfigDocType.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a)&amp;nbsp;In DAT, click on the Open icon for ConfigDocType-Scenario1.&lt;br /&gt;b)&amp;nbsp;Check the boxes for projects number 2 and 4.&lt;br /&gt;c)&amp;nbsp;Click Submit and then close the form.&lt;br /&gt;d)&amp;nbsp;In DAT, click Edit for ConfigDocType-Scenario1 and then click on the Documents tab.&lt;br /&gt;e)&amp;nbsp;Note the DocID of the document submitted. We will use this in the next step.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;9.&amp;nbsp;Modify the resource&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a)&amp;nbsp;Design a new, blank form in InfoPath.&lt;br /&gt;b)&amp;nbsp;Click on Tools &amp;gt; Data Connection, and then click Add.&lt;br /&gt;c)&amp;nbsp;Select Receive Data and click Next. Then select Web Service and click Next.&lt;br /&gt;d)&amp;nbsp;Enter the URL of the Resource service, which in default installations is &lt;a href="http://%3cservername%3e/QdabraWebService/DBXLResource.asmx"&gt;http://&amp;lt;servername&amp;gt;/QdabraWebService/DBXLResource.asmx&lt;/a&gt;. Click Next.&lt;br /&gt;e)&amp;nbsp;Select ModifyResource and click Next.&lt;br /&gt;f)&amp;nbsp;Enter the parameters as seen in Figure 3, but change the value for DocID to the one created in step 8.&lt;br /&gt;g)&amp;nbsp;To see the result of the query drag the Success node, /dfs:myFields/dfs:dataFields/tns:ModifyResourceResponse/tns:ModifyResourceResult/tns:Success, into the view.&lt;br /&gt;h)&amp;nbsp;Click Preview to execute the query. You will see the Success checkbox shown as checked. This means the resource has been successfully modified.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;10.&amp;nbsp;Check the result by clicking on the Open icon for TargetDocType-Scenario1. The form will open and the dropdown will only show the two projects selected in the new document created for ConfigDocType-Scenario1 in step 8.&lt;/p&gt;
&lt;p&gt;Note that during server migrations, the DocID may change. This setup allows you to quickly change these references in your new environment.&lt;/p&gt;
&lt;p&gt;To delete the resource, call DeleteResource. However, note that deleting the resource will break your form, which you will need to edit manually to fix the data connections.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;strong&gt;Scenario 2: Resource uses xml&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In this scenario, an administrator creates one DocType and sets up an Xml resource to control settings in the DocType. The settings will apply to all users; therefore, AllowUserVersions will be set to False. This avoids the use of a separate DocType, which is economical for licensing purposes. When setting up this scenario, the DocID parameter in CreateResource must be set to 0.&lt;/p&gt;
&lt;p&gt;Before we begin, open Target-Scenario1.xsn in design mode in InfoPath and save it as Target-Scenario2.xsn, so that we don’t overwrite our previous work. For the same reasons, save Config-Scenario1.xsn as Config-Scenario2.xsn.&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp;Setup the Target Document Type in DAT.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Open the DBXL Administration Tool.&lt;br /&gt;b.&amp;nbsp;Click on New Configuration.&lt;br /&gt;c.&amp;nbsp;Attach Target-Scenario2.xsn in the InfoPath Form Template field.&lt;br /&gt;d.&amp;nbsp;Name this TargetDocType-Scenario2 and click Save. Click OK in the confirmation message, then click on Catalog.&lt;br /&gt;2.&amp;nbsp;Create the resource for TargetDocType-Scenario2.&lt;br /&gt;a.&amp;nbsp;Create a new, blank form in InfoPath.&lt;br /&gt;b.&amp;nbsp;Click on Tools &amp;gt; Data Connection, and then click Add.&lt;br /&gt;c.&amp;nbsp;Select Receive Data and click Next. Then select Web Service and click Next.&lt;br /&gt;d.&amp;nbsp;Enter the URL of the Resource service and click Next.&lt;br /&gt;e.&amp;nbsp;Select CreateResource and click Next.&lt;br /&gt;f.&amp;nbsp;Enter the parameters as seen in Figure 5, noting that the value for DocID is now 0.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30823/original.aspx" alt="" /&gt;&lt;br /&gt;&lt;em&gt;Figure 5&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;g.&amp;nbsp;Click Next twice, then click on Finish and Close to exit.&lt;br /&gt;h.&amp;nbsp;To see the result of the query drag the Success node, /dfs:myFields/dfs:dataFields/tns:CreateResourceResponse/tns:CreateResourceResult/tns:Success, into the view.&lt;br /&gt;i.&amp;nbsp;Click Preview to execute the query. You will see the Success checkbox shown as checked. This means the resource has been successfully created. You can now close this form without saving.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;3.&amp;nbsp;Create an auxiliary XML file.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;In a text editor, such as Notepad, create an XML file, as seen below:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;lt;config&amp;gt;&lt;br /&gt;&amp;lt;doctypename&amp;gt;TargetDocType-Scenario2&amp;lt;/doctypename&amp;gt;&lt;br /&gt;&amp;lt;resourcename&amp;gt;SelectedProjects&amp;lt;/resourcename&amp;gt;&lt;br /&gt;&amp;lt;/config&amp;gt;&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;b.&amp;nbsp;Save the file as configuration2.xml.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;4.&amp;nbsp;Add the auxiliary XML file to Config-Scenario2.xsn&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Open Config-Scenario2.xsn in design mode in InfoPath.&lt;br /&gt;b.&amp;nbsp;Click on Tools &amp;gt; Data Connections.&lt;br /&gt;c.&amp;nbsp;Select Add, then Receive Data, and click Next.&lt;br /&gt;d.&amp;nbsp;Select XML Document and click Next.&lt;br /&gt;e.&amp;nbsp;Select the document created in step 3 by using the Browse button. Click Next when the file is selected. &lt;br /&gt;f.&amp;nbsp;Opt to Include the data as a resource file in the form template or template part, as well as Automatically retrieve data when from is opened. Finish the wizard.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;5.&amp;nbsp;Modify the button to submit to SaveResourceXml&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Double click on the Submit button and click on Submit Options.&lt;br /&gt;b.&amp;nbsp;Click Add. This will open the Data Connection Wizard.&lt;br /&gt;c.&amp;nbsp;Enter the URL for DbxlResource.asmx and click Next.&lt;br /&gt;d.&amp;nbsp;Select SaveResourceXml and click Next.&lt;br /&gt;e.&amp;nbsp;You will be shown a screen with three parameters.&lt;/p&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;i.&amp;nbsp;Double click on the docTypeName parameter, then select the doctypename node from the configuration (Secondary) data connection.&lt;br /&gt;ii.&amp;nbsp;Double click on the resourceName parameter, then select the resourcename node from the configuration (Secondary) data connection.&lt;br /&gt;iii.&amp;nbsp;For both fields, select to Submit data as string.&lt;br /&gt;iv.&amp;nbsp;Double click on the resourceXml parameter and select the group that contains the projects in the Main Data source, as seen in Figure 6.&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30824/original.aspx" alt="" /&gt;&lt;br /&gt;&lt;em&gt;Figure 6&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;v.&amp;nbsp;Change the Include dropdown for the resourceXml parameter to select XML subtree, including selected element. &lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30825/original.aspx" alt="" /&gt;&amp;nbsp;&lt;br /&gt;&lt;em&gt;Figure 7&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;f.&amp;nbsp;Click Next, then click Finish.&lt;br /&gt;g.&amp;nbsp;In the Choose a data connection for submit, make sure that this new connection is selected. By default, InfoPath selects this data connection you have just created. Click OK twice.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;6.&amp;nbsp;Generate the initial XML for your resource.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Click on Preview for Config-Scenario2.xsn.&lt;br /&gt;b.&amp;nbsp;Select the projects you wish to include and click on Submit.&lt;br /&gt;c.&amp;nbsp;Close the Preview, then save and close the file.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;7.&amp;nbsp;Modify the data connection in the form&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Open Target-Scenario2.xsn in design mode in InfoPath.&lt;br /&gt;b.&amp;nbsp;Click on Tools &amp;gt; Data Connections.&lt;br /&gt;c.&amp;nbsp;Click to Modify the Data Connection called GetResourceXml.&lt;br /&gt;d.&amp;nbsp;Click Next until you reach the parameter-entry screen. &lt;br /&gt;e.&amp;nbsp;Modify the docTypeName parameter to TargetDocType-Scenario2 and finish the wizard.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;8.&amp;nbsp;Modify the filter for the dropdown.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Double click on the dropdown control.&lt;br /&gt;b.&amp;nbsp;Click on the Select XPath icon next to the Entries field.&lt;br /&gt;c.&amp;nbsp;In the Select a Field or Group dialog, click on Filter Data.&lt;br /&gt;d.&amp;nbsp;Click Remove to remove the existing filter (used in Scenario 1), then click Add.&lt;br /&gt;e.&amp;nbsp;In the first dropdown, choose Select a field or group, then select the value node.&lt;br /&gt;f.&amp;nbsp;In the middle dropdown, leave the selection as is equal to.&lt;br /&gt;g.&amp;nbsp;In the third dropdown, choose Select a field or group.&lt;br /&gt;h.&amp;nbsp;Change the Data Source to GetResourceXml and select the projects node. Click OK four times.&lt;br /&gt;i.&amp;nbsp;Save and close the form.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;9.&amp;nbsp;Verify the result&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Click to Edit the TargetDocType-Scenario2 configuration in DAT.&lt;br /&gt;b.&amp;nbsp;Attach the updated Target-Scenario2.xsn form and click Save. Click OK on the confirmation dialog, then click Catalog.&lt;br /&gt;c.&amp;nbsp;Click to open TargetDocType-Scenario2 and verify that the projects selected in step 6 are shown in the dropdown, as seen in Figure 8.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30826/original.aspx" alt="" /&gt;&lt;br /&gt;&lt;em&gt;Figure 8&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;To modify the resource, we can use SaveResourceXml to update the xml. One simple way is to open Config-Scenario.xsn, select a different set of projects, and submit the form. Alternatively, you may wish to design a form that:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;1.&amp;nbsp;Reads the current xml using GetResourceXml&lt;br /&gt;2.&amp;nbsp;Displays fields that allow the administrator to modify the values.&lt;br /&gt;3.&amp;nbsp;Updates the resource Xml by using SaveResourceXml.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Scenario 3: Resource uses another DocID and user versions&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In this scenario, an administrator creates two DocTypes, where one will manage settings for the other. The users will be allowed to save individual versions of the XML; therefore, AllowUserVersions will be set to True. The original XML is stored in the ConfigDocType; user versions are stored in a SQL table. &lt;/p&gt;
&lt;p&gt;Like Scenario 1, this setup is useful for server migrations, when DocIDs are likely to change. Instead of hard coding the DocID value into the InfoPath form, the user can change the resource’s reference DocID as necessary. &lt;/p&gt;
&lt;p&gt;Before we begin, open Target-Scenario1.xsn in design mode in InfoPath and save it as Target-Scenario3.xsn, so that we don’t overwrite our previous work. For the same reasons, save Config-Scenario1.xsn as Config-Scenario3.xsn.&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp;Create the configurations in DAT&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Open the DBXL Administration Tool.&lt;br /&gt;b.&amp;nbsp;Click on New Configuration.&lt;br /&gt;c.&amp;nbsp;Attach Config-Scenario3.xsn in the InfoPath Form Template field.&lt;br /&gt;d.&amp;nbsp;Name this ConfigDocType-Scenario3 and click Save. Click OK in the confirmation message, then click on Catalog.&lt;br /&gt;e.&amp;nbsp;Click on New Configuration.&lt;br /&gt;f.&amp;nbsp;Attach Target-Scenario3.xsn in the InfoPath Form Template field.&lt;br /&gt;g.&amp;nbsp;Name this TargetDocType-Scenario3 and click Save. Click OK in the confirmation message, then click on Catalog.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;2.&amp;nbsp;Add a document to the ConfigDocType&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Click on the Open icon for ConfigDocType-Scenario3.&lt;br /&gt;b.&amp;nbsp;Check the boxes for projects number 1, 3 and 5.&lt;br /&gt;c.&amp;nbsp;Click Submit and then close the form.&lt;br /&gt;d.&amp;nbsp;In DAT, click Edit for ConfigDocType-Scenario3 and then click on the Documents tab.&lt;br /&gt;e.&amp;nbsp;Note the DocID of the document submitted. We will use this in the next step.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;3.&amp;nbsp;Create the resource.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Create a new, blank form in InfoPath.&lt;br /&gt;b.&amp;nbsp;Click on Tools &amp;gt; Data Connection, and then click Add.&lt;br /&gt;c.&amp;nbsp;Select Receive Data and click Next. Then select Web Service and click Next.&lt;br /&gt;d.&amp;nbsp;Enter the URL of the Resource service and click Next.&lt;br /&gt;e.&amp;nbsp;Select CreateResource and click Next.&lt;br /&gt;f.&amp;nbsp;Enter the parameters as seen in Figure 9.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30827/original.aspx" alt="" /&gt;&lt;br /&gt;&lt;em&gt;Figure 9&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;g.&amp;nbsp;Click Next twice, then click on Finish and Close to exit.&lt;br /&gt;h.&amp;nbsp;To see the result of the query drag the Success node, /dfs:myFields/dfs:dataFields/tns:CreateResourceResponse/tns:CreateResourceResult/tns:Success, into the view.&lt;br /&gt;i.&amp;nbsp;Click Preview to execute the query. You will see the Success checkbox shown as checked. This means the resource has been successfully created. You can now close this form without saving.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;4.&amp;nbsp;Modify the resource data connection in TargetDocType&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Open Target-Scenario3.xsn in design mode in InfoPath.&lt;br /&gt;b.&amp;nbsp;Click on File &amp;gt; Data Connections.&lt;br /&gt;c.&amp;nbsp;Select GetResourseXml and click on Modify. Click Next in the first screen.&lt;br /&gt;d.&amp;nbsp;Select GetUserResourceXml and click Next.&lt;br /&gt;e.&amp;nbsp;Enter the DocTypeName and ResourceName and click Next until the wizard is complete, then click Finish, making sure that the Automatically retrieve data when form is opened is checked. For convenience, make sure the Data Connection is named GetUserResourceXml.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;5.&amp;nbsp;Create an auxiliary XML file.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;In a text editor, such as Notepad, create an XML file, as seen below:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;lt;config&amp;gt;&lt;br /&gt;&amp;lt;doctypename&amp;gt;TargetDocType-Scenario3&amp;lt;/doctypename&amp;gt;&lt;br /&gt;&amp;lt;resourcename&amp;gt;SelectedProjects&amp;lt;/resourcename&amp;gt;&lt;br /&gt;&amp;lt;/config&amp;gt;&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;b.&amp;nbsp;Save the file as configuration3xml.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;6.&amp;nbsp;Create a user configuration form.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Open Config-Scenario3.xsn in design mode in InfoPath.&lt;br /&gt;b.&amp;nbsp;Save the form as Config-Scenario3User.xsn.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;7.&amp;nbsp;Add the auxiliary XML file to Config-Scenario3User.xsn&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Click on Tools &amp;gt; Data Connections.&lt;br /&gt;b.&amp;nbsp;Select Add, then Receive Data, and click Next.&lt;br /&gt;c.&amp;nbsp;Select XML Document and click Next.&lt;br /&gt;d.&amp;nbsp;Select the xml document by using the Browse button. Click Next when the file is selected. &lt;br /&gt;e.&amp;nbsp;Opt to Include the data as a resource file in the form template or template part, as well as Automatically retrieve data when from is opened. Finish the wizard.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;8.&amp;nbsp;Modify the button to submit to SaveUserResourceXml&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Double click on the button and change its label to SaveUserResourceXml.&lt;br /&gt;b.&amp;nbsp;Select Submit from the Action dropdown, and then click on Submit Options.&lt;br /&gt;c.&amp;nbsp;Click Add. This will open the Data Connection Wizard.&lt;br /&gt;d.&amp;nbsp;Enter the URL for DbxlResource.asmx and click Next.&lt;br /&gt;e.&amp;nbsp;Select SaveUserResourceXml and click Next.&lt;br /&gt;f.&amp;nbsp;You will be shown a screen with three parameters.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;i.&amp;nbsp;Double click on the docTypeName parameter, then select the doctypename node from the configuration (Secondary) data connection.&lt;br /&gt;ii.&amp;nbsp;Double click on the resourceName parameter, then select the resourcename node from the configuration (Secondary) data connection.&lt;br /&gt;iii.&amp;nbsp;Double click on the resourceXml parameter and select the group that contains the projects node in the Main Data source. Note that this XML tree being submitted must match exactly with the XML of the document submitted in step 2.&lt;br /&gt;iv.&amp;nbsp;Change the Include dropdown for the resourceXml parameter to select XML subtree, including selected element. &lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;g.&amp;nbsp;Click Next, then click Finish.&lt;br /&gt;h.&amp;nbsp;In the Choose a data connection for submit, make sure that this new connection is selected. By default, InfoPath selects this data connection you have just created. Click OK twice.&lt;br /&gt;i.&amp;nbsp;Save and close the file.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;9.&amp;nbsp;Verify the SaveUserResourceXml button&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Click to Edit the TargetDocType-Scenario3 configuration in DAT.&lt;br /&gt;b.&amp;nbsp;Attach the updated Target-Scenario3.xsn form and click Save. Click OK on the confirmation dialog, then click Catalog.&lt;br /&gt;c.&amp;nbsp;Click to open TargetDocType-Scenario3. It will load with the projects you, as admin, selected in step 2. Close the form.&lt;br /&gt;d.&amp;nbsp;Open the Config-Scenario3User.xsn form, select a different set of projects and then click the SaveUserResourceXml button. You will be notified, thru a dialog, that the form was submitted.&lt;br /&gt;e.&amp;nbsp;Click to open TargetDocType-Scenario3. It will load with the projects you selected, as a regular user, in step 9(d). Close the form.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;10.&amp;nbsp;Create a button that calls ResetUserResourceXml&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Open Config-Scenario3User.xsn in design mode in InfoPath.&lt;br /&gt;b.&amp;nbsp;Insert a new button and double click on it.&lt;br /&gt;c.&amp;nbsp;Change its label to ResetUserResourceXml, and then change the Action dropdown to Rules and Custom code.&lt;br /&gt;d.&amp;nbsp;Click on Rules. Click Add. Click Add Action.&lt;br /&gt;e.&amp;nbsp;Select Query using a data connection from the dropdown and click Add. This will open the Data Connection Wizard.&lt;br /&gt;f.&amp;nbsp;In the first screen, click Next. Select Web service and click Next.&lt;br /&gt;g.&amp;nbsp;Enter the URL for DbxlResource.asmx and click Next.&lt;br /&gt;h.&amp;nbsp;Select ResetUserResourceXml and click Next.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;i.&amp;nbsp;You will be shown a screen with two parameters.&lt;br /&gt;i.&amp;nbsp;For docTypeName parameter, type in the name of the document type, which is TargetDocType-Scenario3.&lt;br /&gt;ii.&amp;nbsp;For the resourceName parameter, enter the name of the resource, which in this example is SelectedProjects.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;j.&amp;nbsp;Click Next. Make sure to uncheck the checkbox for Automatically retrieve data when from is opened. Finish the wizard.&lt;br /&gt;k.&amp;nbsp;In the Action screen, make sure that this new data connection is selected in the Data connection dropdown, and then click OK until all dialogs are closed.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;11.&amp;nbsp;Verify the ResetUserResourceXml button&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Click Preview for the Config-Scenario3User.xsn form and click the ResetUserResourceXml button. This resets this users ResourceXml to the one originally saved by the admin in step 2.&lt;br /&gt;b.&amp;nbsp;Click to open TargetDocType-Scenario3. It will load with the projects you, as admin, selected in step 2. Close the form.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Note that the user is automatically detected (and stored in SQL) when we call SaveUserResourceXml and GetUserResourceXml, so there are no additional steps on our part regarding the users.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Scenario 4: Resource uses xml and stores custom user settings&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In this scenario, an administrator creates one DocType and sets up an xml resource to control settings in the DocType. The individual users will be allowed to modify and save personal settings; therefore, AllowUserVersions will be set to True. This scenario, like Scenario 2, avoids the use of a separate DocType, which is economical for licensing purposes. When setting up this scenario, the DocID parameter in CreateResource must be set to 0.&lt;/p&gt;
&lt;p&gt;Before we begin, open Target-Scenario3.xsn in design mode in InfoPath and save it as Target-Scenario4.xsn, so that we don’t overwrite our previous work. For the same reasons, save Config-Scenario3.xsn as Config-Scenario4.xsn and Config-Scenario3User.xsn as Config-Scenario4User.xsn&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp;Create the configuration in DAT&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Open the DBXL Administration Tool.&lt;br /&gt;b.&amp;nbsp;Click on New Configuration.&lt;br /&gt;c.&amp;nbsp;Attach Target-Scenario4.xsn in the InfoPath Form Template field.&lt;br /&gt;d.&amp;nbsp;Name this TargetDocType-Scenario4 and click Save. Click OK in the confirmation message, then click on Catalog.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;2.&amp;nbsp;Create the resource.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Create a new, blank form in InfoPath.&lt;br /&gt;b.&amp;nbsp;Click on Tools &amp;gt; Data Connection, and then click Add.&lt;br /&gt;c.&amp;nbsp;Select Receive Data and click Next. Then select Web Service and click Next.&lt;br /&gt;d.&amp;nbsp;Enter the URL of the Resource service and click Next.&lt;br /&gt;e.&amp;nbsp;Select CreateResource and click Next.&lt;br /&gt;f.&amp;nbsp;Enter the parameters as seen in Figure 10.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30828/original.aspx" alt="" /&gt;&lt;br /&gt;&lt;em&gt;Figure 10&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;g.&amp;nbsp;Click Next twice, then click on Finish and Close to exit.&lt;br /&gt;h.&amp;nbsp;To see the result of the query drag the Success node, /dfs:myFields/dfs:dataFields/tns:CreateResourceResponse/tns:CreateResourceResult/tns:Success, into the view.&lt;br /&gt;i.&amp;nbsp;Click Preview to execute the query. You will see the Success checkbox shown as checked. This means the resource has been successfully created. You can now close this form without saving.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;3.&amp;nbsp;Create a new auxiliary XML file.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;In a text editor, such as Notepad, create an XML file, as seen below:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;lt;config&amp;gt;&lt;br /&gt;&amp;lt;doctypename&amp;gt;TargetDocType-Scenario4&amp;lt;/doctypename&amp;gt;&lt;br /&gt;&amp;lt;resourcename&amp;gt;SelectedProjects&amp;lt;/resourcename&amp;gt;&lt;br /&gt;&amp;lt;/config&amp;gt;&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;b.&amp;nbsp;Save the file as configuration4.xml.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;4.&amp;nbsp;Add the auxiliary XML file to Config-Scenario4.xsn&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Click on Tools &amp;gt; Data Connections.&lt;br /&gt;b.&amp;nbsp;Select Add, then Receive Data, and click Next.&lt;br /&gt;c.&amp;nbsp;Select XML Document and click Next.&lt;br /&gt;d.&amp;nbsp;Select the xml document by using the Browse button. Click Next when the file is selected. &lt;br /&gt;e.&amp;nbsp;Opt to Include the data as a resource file in the form template or template part, as well as Automatically retrieve data when from is opened. Finish the wizard.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;5.&amp;nbsp;Modify the GetUserResourceXml connection in Target-Scenario4.xsn&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Open Target-Scenario4.xsn in design mode in InfoPath.&lt;br /&gt;b.&amp;nbsp;Click on File &amp;gt; Data Connections.&lt;br /&gt;c.&amp;nbsp;Select GetUserResourseXml and click on Modify. Click Next twice.&lt;br /&gt;d.&amp;nbsp;Change the DocTypeName to TargetDocType-Scenario4 and click Next until the wizard is complete, then click Finish, making sure that the Automatically retrieve data when form is opened is checked. For convenience, make sure the Data Connection is named GetUserResourceXml.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;6.&amp;nbsp;Modify Config-Scenario4.xsn to submit to TargetDocType-Scenario4.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Double click on the Submit button and change its label to SaveResourceXml.&lt;br /&gt;b.&amp;nbsp;Click on Submit Options.&lt;br /&gt;c.&amp;nbsp;Click Add. This will open the Data Connection Wizard.&lt;br /&gt;d.&amp;nbsp;Enter the URL for DbxlResource.asmx and click Next.&lt;br /&gt;e.&amp;nbsp;Select SaveResourceXml and click Next.&lt;br /&gt;f.&amp;nbsp;You will be shown a screen with three parameters.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;i.&amp;nbsp;Double click on the docTypeName parameter, then select the doctypename node from the configuration (Secondary) data connection. Opt to submit this field as a string.&lt;br /&gt;ii.&amp;nbsp;Double click on the resourceName parameter, then select the resourcename node from the configuration (Secondary) data connection. Opt to submit this field as a string.&lt;br /&gt;iii.&amp;nbsp;Double click on the resourceXml parameter and select the group that contains the projects node in the Main Data source. Note that this XML tree being submitted must match exactly with the XML of the document submitted in step 2.&lt;br /&gt;iv.&amp;nbsp;Change the Include dropdown for the resourceXml parameter to select XML subtree, including selected element. &lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;g.&amp;nbsp;Click Next, then click Finish.&lt;br /&gt;h.&amp;nbsp;In the Choose a data connection for submit, make sure that this new connection is selected. By default, InfoPath selects this data connection you have just created. Click OK twice.&lt;br /&gt;i.&amp;nbsp;Save and close the file.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;7.&amp;nbsp;Modify the auxiliary XML file in Config-Scenario4User.xsn&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Click on Tools &amp;gt; Data Connections.&lt;br /&gt;b.&amp;nbsp;Select the configuration xml and click Modify.&lt;br /&gt;c.&amp;nbsp;Select the updated configuration4.xml using the Browse button and click Next.&lt;br /&gt;d.&amp;nbsp;Opt to Include the data as a resource file in the form template or template part, as well as Automatically retrieve data when from is opened. Finish the wizard.&lt;br /&gt;e.&amp;nbsp;Save and close the Config-Scenario4User.xsn file.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;8.&amp;nbsp;Use Config-Scenario4.xsn to generate the initial xml.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Open Config-Scenario4.xsn, select a set of projects and click on SaveResourceXml. A dialog box will confirm the success of the operation. &lt;br /&gt;b.&amp;nbsp;Close the form.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;9.&amp;nbsp;Verify the result&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;In DAT, click to Edit the configuration for TargetDocType-Scenario4. Attach the updated form and click Save.&lt;br /&gt;b.&amp;nbsp;Open TargetDocType-Scenario4 and verify that it shows only the projects selected in step 7. Close the form.&lt;br /&gt;c.&amp;nbsp;Open Config-Scenario4User.xsn, select a different set of projects and submit.&lt;br /&gt;d.&amp;nbsp;Open TargetDocType-Scenario4 from DAT to see the form showing the selections made in (c).&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;10.&amp;nbsp;Create a button that calls ResetUserResourceXml&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Open Config-Scenario4User.xsn in design mode in InfoPath.&lt;br /&gt;b.&amp;nbsp;Insert a new button and double click on it.&lt;br /&gt;c.&amp;nbsp;Change its label to ResetUserResourceXml, and then change the Action dropdown to Rules and Custom code.&lt;br /&gt;d.&amp;nbsp;Click on Rules. Click Add. Click Add Action.&lt;br /&gt;e.&amp;nbsp;Select Query using a data connection from the dropdown and click Add. This will open the Data Connection Wizard.&lt;br /&gt;f.&amp;nbsp;In the first screen, click Next. Select Web service and click Next.&lt;br /&gt;g.&amp;nbsp;Enter the URL for DbxlResource.asmx and click Next.&lt;br /&gt;h.&amp;nbsp;Select ResetUserResourceXml and click Next.&lt;/p&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;i.&amp;nbsp;You will be shown a screen with two parameters.&lt;br /&gt;iii.&amp;nbsp;For docTypeName parameter, type in the name of the document type, which is TargetDocType-Scenario4.&lt;br /&gt;iv.&amp;nbsp;For the resourceName parameter, enter the name of the resource, which in this example is SelectedProjects.&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;j.&amp;nbsp;Click Next. Make sure to uncheck the checkbox for Automatically retrieve data when from is opened. Finish the wizard.&lt;br /&gt;k.&amp;nbsp;In the Action screen, make sure that this new data connection is selected in the Data connection dropdown, and then click OK until all dialogs are closed.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;11.&amp;nbsp;Verify the ResetUserResourceXml button&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Click Preview for the Config-Scenario4User.xsn form and click the ResetUserResourceXml button. You will be notified, thru a dialog, that the form was submitted.&lt;br /&gt;b.&amp;nbsp;Click to open TargetDocType-Scenario4. It will load with the projects you, as admin, selected in step 8. Close the form.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Futher work&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Here are two ideas for developers to consider when using the DBXLResources feature:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;1.&amp;nbsp;Incorporate Config xsns as a separate view in the Target document types for scenarios 3 and 4. When attempting this, remember that the individual users need to submit an xml structure that is identical to the one submitted by the admin using SaveResourceXml.&lt;/p&gt;
&lt;p&gt;2.&amp;nbsp;Improve the Config xsns from Scenarios 2, 3 and 4 to automatically display the currently-saved xml. That is, the checkboxes are right now being shown as unchecked, thus not allowing the user to see what the current version of the xml looks like. Ideally, we the developer will show the current version and submit changes to overwrite.&lt;/p&gt;&lt;/blockquote&gt;</description><enclosure url="http://www.infopathdev.com/files/folders/30829/download.aspx" length="212992" type="application/octet-stream" /></item><item><title>How To Query the Active Directory Web Service</title><link>http://www.infopathdev.com/files/folders/web_methods/entry30677.aspx</link><pubDate>Tue, 22 Jul 2008 15:13:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:30677</guid><dc:creator>ErnestoM</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;The Active Directory Service supports two methods: GetUserInfo and GetMyInfo. This document will show you how to set up a sample form that queries GetUserInfo with a user-entered username string. For a fully-formatted Word document, click the Download button above.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Setup the Active Directory Web Service&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;1.&amp;nbsp;To confirm that the Active Directory Web Service is working on your server, open Internet Explorer from the machine where DBXL is installed and navigate to the Web Service page on &lt;a href="http://%3cservername%3e/QdabraWebService/ADUserInfo.asmx"&gt;http://&amp;lt;servername&amp;gt;/QdabraWebService/ADUserInfo.asmx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30672/original.aspx" alt="" /&gt;&amp;nbsp;&lt;br /&gt;&lt;em&gt;Figure 1&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;2.&amp;nbsp;Click the GetMyInfo link.&lt;br /&gt;3.&amp;nbsp;Click the Invoke link.&lt;br /&gt;4.&amp;nbsp;A new Internet Explorer window will open and display the user information.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Query GetUserInfo&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;1.&amp;nbsp;Open InfoPath and choose to Design a new blank form.&lt;br /&gt;2.&amp;nbsp;Create a new data connection to the Active Directory Web Service:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Click on Tools &amp;gt; Data Connections &amp;gt; Add. This will open the Data Connection Wizard.&lt;br /&gt;b.&amp;nbsp;Select Receive Data and click Next.&lt;br /&gt;c.&amp;nbsp;Select To a Web service and click Next.&lt;br /&gt;d.&amp;nbsp;Type in the URL for the Active Directory Web Service (for example &lt;a href="http://%3cservername%3e/QdabraWebService/ADUserInfo.asmx"&gt;http://&amp;lt;servername&amp;gt;/QdabraWebService/ADUserInfo.asmx&lt;/a&gt;) and click Next.&lt;br /&gt;e.&amp;nbsp;Select the GetUserInfo method and click Next.&lt;br /&gt;f.&amp;nbsp;In the parameters window, click Next.&lt;br /&gt;g.&amp;nbsp;Do not check Store a copy of the data in the form template and click Next.&lt;br /&gt;h.&amp;nbsp;Uncheck Automatically retrieve data when form is loaded and click Finish. &lt;br /&gt;i.&amp;nbsp;Finally, close the Data Connections window.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;3.&amp;nbsp;Create the form using the appropriate fields.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Navigate to Data Source in the task pane.&lt;br /&gt;b.&amp;nbsp;Change Main in the dropdown to GetUserInfo (Secondary).&lt;br /&gt;c.&amp;nbsp;Expand the queryFields node until you see username.&lt;br /&gt;d.&amp;nbsp;Drag username from the Data Source to the view.&lt;br /&gt;e.&amp;nbsp;Expand dataFields until you see ADProp.&lt;br /&gt;f.&amp;nbsp;Drag the ADProp node into the view and choose repeating table.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30673/original.aspx" alt="" /&gt;&lt;br /&gt;Figure 2&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;4.&amp;nbsp;Add a Rules button to query the service:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Navigate to Controls in the task pane and click Button. This will add a Button control into the view.&lt;br /&gt;b.&amp;nbsp;Double-click the newly added button in the view. Change the label to Run Query.&lt;br /&gt;c.&amp;nbsp;Click Rules, then click Add, then click Add Action.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30674/original.aspx" alt="" /&gt;&lt;br /&gt;Figure 3&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;d.&amp;nbsp;Select Query using a data connection from the dropdown. The data connection created previously will show up in the Data Connection dropdown. Click OK until the dialogs have been closed.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;5.&amp;nbsp;See the form in action.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Click Preview.&lt;br /&gt;b.&amp;nbsp;Enter the username for a user in your domain, and then click the Run Query button.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The user’s information from your Active Directory will be displayed. This will allow you to see all the Keys available, which we will use in the next section of this document.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Query GetMyInfo&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The following steps will illustrate how to set the value of a field in your form to a value returned by the GetMyInfo method of the Active Directory Web.&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp;Open InfoPath and choose to Design a new blank form.&lt;br /&gt;2.&amp;nbsp;Create a new data connection to the Active Directory Web Service:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Click on Tools &amp;gt; Data Connections &amp;gt; Add. This will open the Data Connection Wizard.&lt;br /&gt;b.&amp;nbsp;Select Receive Data and click Next.&lt;br /&gt;c.&amp;nbsp;Select To a Web service and click Next.&lt;br /&gt;d.&amp;nbsp;Type in the URL for the Active Directory Web Service (for example &lt;a href="http://servername/qdabrawebservice/ADUserInfo.asmx"&gt;http://servername/qdabrawebservice/ADUserInfo.asmx&lt;/a&gt;) and click Next.&lt;br /&gt;e.&amp;nbsp;Select the GetMyInfo method and click Next.&lt;br /&gt;f.&amp;nbsp;Do not check Store a copy of the data in the form template and click Next.&lt;br /&gt;g.&amp;nbsp;Check Automatically retrieve data when form is loaded and click Finish. &lt;br /&gt;h.&amp;nbsp;Finally, close the Data Connections window.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;3.&amp;nbsp;Create the field and the rule to set its value.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Navigate to Controls in the task pane and click on Text Box. &lt;br /&gt;b.&amp;nbsp;Double-click on the textbox field in the view.&lt;br /&gt;c.&amp;nbsp;In the Default Value section, click on the fx button to the right.&lt;br /&gt;d.&amp;nbsp;Click Insert Field or Group.&lt;br /&gt;e.&amp;nbsp;Select the GetMyInfo (Secondary) data source from the dropdown.&lt;br /&gt;f.&amp;nbsp;Expand the xml tree to reach the node dataFields/tns:GetMyInfoResponse/GetMyInfoResult/ADProp&lt;br /&gt;g.&amp;nbsp;Select Value and click Filter Data.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30675/original.aspx" alt="" /&gt;&lt;br /&gt;Figure 4&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;h.&amp;nbsp;In the Specify Filter Conditions dialog, click Add. &lt;br /&gt;i.&amp;nbsp;Select Key in the first drop down. &lt;br /&gt;j.&amp;nbsp;Leave the second dropdown set to is equal to. &lt;br /&gt;k.&amp;nbsp;In the third dropdown type the text &amp;quot;cn&amp;quot; (or whatever key you prefer) without the double quotes. Notice that InfoPath adds double quotes after you type and tab out.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30676/original.aspx" alt="" /&gt;&lt;br /&gt;Figure 5&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;l.&amp;nbsp;Click OK to close every dialog.&lt;br /&gt;m.&amp;nbsp;Preview the form. The value for the key you selected is automatically loaded to the textbox.&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;</description><enclosure url="http://www.infopathdev.com/files/folders/30677/download.aspx" length="225280" type="application/msword" /></item><item><title>How To Perform Bulk Edit operations on Existing Documents</title><link>http://www.infopathdev.com/files/folders/web_methods/entry30374.aspx</link><pubDate>Fri, 11 Jul 2008 21:07:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:30374</guid><dc:creator>ErnestoM</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;This document is a guide for using the BulkEditDocuments, EditAllDocuments, EditDocuments, TestAllDocuments and TestEditDocuments web methods found on the DbxlAdmin.asmx web service.&amp;nbsp; These methods are intended for admin-use only and should be used with care, as one Bulk Edit operation may impact a large number of documents.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Overview&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Intended Use&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;These methods are intended to be used by an administrator or developer who needs to make a change to a node in the XML of several documents stored within DBXL.&amp;nbsp; A single call can update nodes in several documents at once without ever having to open InfoPath.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Bulk Behavior&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The batch operation performs a skip-on-error iteration for the documents.&amp;nbsp; If a document in the batch fails the edit for some reason (node does not exist), then an error is added to the dataFields’ return with details, and the next iteration is executed.&lt;/p&gt;
&lt;p&gt;The Success node within dataFields only returns true if all documents were edited without error, otherwise it returns false.&lt;/p&gt;
&lt;p&gt;The total number of changes performed is returned as an ErrorInfo node in dataFields.&amp;nbsp; This count includes all changes within each document, so if you are changing a repeating node this number could be several times greater than the number of documents that are edited.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Permissions&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Permissions are handled implicitly by the SetDocument method.&amp;nbsp; The user who calls one of the EditDocuments methods is the user used for making comparisons for permissions purposes.&amp;nbsp;&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;EditAllDocuments&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This method performs the specified edits to all documents within the specified Document Type.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Parameters&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;•&amp;nbsp;&lt;em&gt;docTypeName&lt;/em&gt; – the name of the Document Type you wish to edit documents within&lt;br /&gt;•&amp;nbsp;&lt;em&gt;xPaths&lt;/em&gt; – Each string passed is used to find the node(s) within each document to insert the corresponding new value into.&amp;nbsp; Full freedom of axes and comparison constructs are allowed in each xPath.&amp;nbsp; The number of xPath nodes must match the number of newValue nodes. An xPath may contain conditional logic so that only certain nodes are updated.&lt;br /&gt;•&amp;nbsp;&lt;em&gt;newValues&lt;/em&gt; – Each string passed is inserted into the node specified by the corresponding xPath.&amp;nbsp; The number of newValue nodes must match the number of xPath nodes.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30369/original.aspx" alt="" /&gt;&lt;br /&gt;&lt;em&gt;FIGURE 1&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Return&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;•&amp;nbsp;&lt;em&gt;Success&lt;/em&gt; – returns true when all documents where edited correctly, false otherwise.&lt;br /&gt;•&amp;nbsp;&lt;em&gt;ErrorInfo&lt;/em&gt; – used to pass errors encountered when editing the documents, as well as returning information about the number of edits made. &lt;br /&gt;•&amp;nbsp;&lt;em&gt;ExecutionTime&lt;/em&gt; – the time taken to execute the call to the web method.&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;TestEditAllDocuments&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;TestEditAllDocuments works in the same way as EditAllDocuments, but changes are not committed. The total changes are calculated and returned.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;EditDocuments&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This method performs the specified edits to all documents specified by the list of docIds.&amp;nbsp; Generally, the documents are in the same Document Type, but this is not enforced by the web method.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Parameters&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;•&amp;nbsp;&lt;em&gt;docIds&lt;/em&gt; – A list of docIds to perform the edits on.&lt;br /&gt;•&amp;nbsp;&lt;em&gt;xPaths&lt;/em&gt; – Each string passed is used to find the node(s) within each document to insert the corresponding new value into.&amp;nbsp; Full freedom of axes and comparison constructs are allowed in each xPath. The number of xPath nodes must match the number of newValue nodes. An xPath may contain conditional logic so that only certain nodes are updated.&lt;br /&gt;•&amp;nbsp;&lt;em&gt;newValues&lt;/em&gt; – Each string passed is inserted into the node specified by the corresponding xPath.&amp;nbsp; The number of newValue nodes must match the number of xPath nodes.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30370/original.aspx" alt="" /&gt;&lt;br /&gt;FIGURE 2&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Return&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;•&amp;nbsp;&lt;em&gt;Success&lt;/em&gt; – returns true when all documents where edited correctly, false otherwise.&lt;br /&gt;•&amp;nbsp;&lt;em&gt;ErrorInfo&lt;/em&gt; – used to pass errors encountered when editing the documents, as well as returning information about the number of edits made. &lt;br /&gt;•&amp;nbsp;&lt;em&gt;ExecutionTime&lt;/em&gt; – the time taken to execute the call to the web method.&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;TestEditDocuments &lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;TestEditDocuments works in the same way as EditDocuments, but the changes are not committed. The total changes are calculated and returned.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;BulkEditDocuments&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This method abstracts calls to EditDocuments to allow multiple edits to be performed with one call to the web service. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Parameters&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;•&amp;nbsp;&lt;em&gt;EditDocuments&lt;/em&gt; – Each object passed here represents a distinct call to EditDocuments, where ID is a value simply provided for the user to distinguish between calls to the service.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30371/original.aspx" alt="" /&gt;&lt;br /&gt;FIGURE 3&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Return&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;•&amp;nbsp;&lt;em&gt;Success&lt;/em&gt; – returns true when all documents where edited correctly, false otherwise.&lt;br /&gt;•&amp;nbsp;&lt;em&gt;ErrorInfo&lt;/em&gt; – used to pass errors encountered when editing the documents, as well as returning information about the number of edits made. &lt;br /&gt;•&amp;nbsp;&lt;em&gt;ExecutionTime&lt;/em&gt; – the time taken to execute the call to the web method.&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Editing the DBXL MetaData Values&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;DBXL uses Mapping Tokens, as seen in the Documents tab of DAT. The data displayed in the catalog view of your qForm-based solution uses this same data during creation and update of a document, but the Bulk Edit Tool must perform two separate operations to maintain the two values in sync.&lt;/p&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30372/original.aspx" alt="" /&gt;&lt;br /&gt;FIGURE 4&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;For example, in the default catalog view for a qForm, there is a checkbox to show the document’s descriptions. The value shown in the Documents tab of DAT and in the Catalog view of the qForm can be changed by altering the value for DBXL::Description. If you make this change, then open the document’s XML, you’ll see the value in the Description field in the form hasn’t changed. That value must be changed by modifying the value for /my:QdCatalog/my:QdForm/@my:description. &lt;/p&gt;
&lt;p&gt;The table below shows the Xpath values for the DBXL Mapping tokens:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30373/original.aspx" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Note that the only comparison operation available when updating the MetaData values is testing the previous value.&lt;/p&gt;
&lt;p&gt;&lt;u&gt;Example:&lt;/u&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;xPath = DBXL::Name[ . = ‘Matt’ ]&lt;br /&gt;newValue = Bob&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;In this example, only the name values that currently have the value of ‘Matt’ will be changed to the new value of ‘Bob’.&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;</description><enclosure url="http://www.infopathdev.com/files/folders/30374/download.aspx" length="132608" type="application/octet-stream" /></item><item><title>How To Perform a Codeless Submit to DBXL</title><link>http://www.infopathdev.com/files/folders/web_methods/entry30110.aspx</link><pubDate>Fri, 04 Jul 2008 22:26:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:30110</guid><dc:creator>ErnestoM</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;When a document is submitted to DBXL it is allocated a unique DocID which can then be used to access that document. There is a codeless solution that will return the DocID back to the form, which involves using a query-type data connection. This document takes the submit operation one step beyond that described in the document called How to Configure a Form to Submit to DBXL Webservice. &lt;/p&gt;
&lt;p&gt;Note that this does not work with repeating values; for forms involving these, we recommend using code so that errors are properly handled.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1.&amp;nbsp;In your InfoPath form, create a query-type web service connection to SubmitDocument&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;In design mode in InfoPath, click Tools &amp;gt; Data Connections.&lt;br /&gt;b.&amp;nbsp;Click Add and select a connection that receives data. Click Next.&lt;br /&gt;c.&amp;nbsp;Select a Web Service connection and click Next.&lt;br /&gt;d.&amp;nbsp;Enter the path to the DBXL Document Service, &lt;a href="http://%3cservername%3e/QdabraWebService/DBXLDocumentService.asmx"&gt;http://&amp;lt;servername&amp;gt;/QdabraWebService/DBXLDocumentService.asmx&lt;/a&gt;, and click Next.&lt;br /&gt;e.&amp;nbsp;Select SubmitDocument and click Next.&lt;br /&gt;f.&amp;nbsp;Enter the DocTypeName parameter, leave the other parameters blank and then click Next. This will be the name of the configuration (Document Type) in DBXL.&lt;br /&gt;g.&amp;nbsp;Do not check the box for Store a copy of the data in the form template.&lt;br /&gt;h.&amp;nbsp;Click Next, uncheck the box to Automatically retrieve data when form is opened, then click Finish to close out the wizard.&lt;br /&gt;i.&amp;nbsp;Click Close to exit the Data Connections dialog.&lt;br /&gt;j.&amp;nbsp;For demonstration purposes, create one field, a text box called customer.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;2.&amp;nbsp;Save an output XML file.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Preview your form.&lt;br /&gt;b.&amp;nbsp;Click on File &amp;gt; Save as to save the XML file.&lt;br /&gt;c.&amp;nbsp;Close the form preview.&lt;br /&gt;d.&amp;nbsp;Open the XML file in a text editor, such as Notepad, and divide the xml into segments, as seen in Figure 1.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30108/original.aspx" alt="" /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;Figure 1&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;e.&amp;nbsp;Create a concat statement, which we will use in the next step. In the case of Figure 1, the statement will look like this: concat(‘segment1’, &amp;lt;customer field&amp;gt;, ‘segment2’). In our example, our form only contains one field. More complex forms will contain x+1 number of segments, where x is the number of fields in the form.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;3.&amp;nbsp;Configure a button that uses rules to call this Data Connection.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Insert a button into your form and double click on it.&lt;br /&gt;b.&amp;nbsp;Click on Rules, click on Add and then click on Add Action.&lt;br /&gt;c.&amp;nbsp;Select Set a field’s value.&lt;br /&gt;d.&amp;nbsp;For the field, select SubmitDocument (Secondary) from the Data Source dropdown, then select the node myFields/queryFields/tns:SubmitDocument/xml, as seen in Figure 2.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30109/original.aspx" alt="" /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;Figure 2&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;e.&amp;nbsp;For the Value, insert the concat statement created in 2c.&lt;br /&gt;f.&amp;nbsp;Click OK twice.&lt;br /&gt;g.&amp;nbsp;Click on Add Action.&lt;br /&gt;h.&amp;nbsp;Select Query using a data connection, choosing the SubmitDocument data connection from the dropdown, and then click OK.&lt;br /&gt;i.&amp;nbsp;Click OK until all dialogs are closed.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;4.&amp;nbsp;Prepare the form to show the results:&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Drag the node /dfs:myFields/dfs:dataFields/tns:SubmitDocumentResponse/tns:docId into the form’s view. This will allow us to see the DocID that is returned when the document is submitted.&lt;br /&gt;b.&amp;nbsp;Save the form and close InfoPath.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;5.&amp;nbsp;Create a new configuration in the DAT and test it.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a.&amp;nbsp;Click on New Configuration.&lt;br /&gt;b.&amp;nbsp;For the configuration name, enter the same value entered in for the parameter in step 1f.&lt;br /&gt;c.&amp;nbsp;Attach the form and click Save. &lt;br /&gt;d.&amp;nbsp;Click OK in the confirmation dialog.&lt;br /&gt;e.&amp;nbsp;Open the form by clicking the Open link.&lt;br /&gt;f.&amp;nbsp;Fill out and click the button. The DocID that is allocated to the document is returned in the DocID node that was created in step 4.&lt;/p&gt;&lt;/blockquote&gt;</description><enclosure url="http://www.infopathdev.com/files/folders/30110/download.aspx" length="91648" type="application/octet-stream" /></item><item><title>Configure a Form to Submit to DBXL Webservice</title><link>http://www.infopathdev.com/files/folders/web_methods/entry30061.aspx</link><pubDate>Wed, 02 Jul 2008 23:43:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:30061</guid><dc:creator>ErnestoM</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;This exercise is intended for new users of DBXL who want to orient themselves to its features and interface. This exercise will go through configuring a form’s data connection to submit to the DBXL Web Service, verification of success, and accessing the submitted form.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tutorial&lt;/strong&gt;&lt;br /&gt;The Qdabra DBXL Web Service stores three metadata properties for all forms: title, author, and description. When InfoPath submits the form to the database, these three fields will be stored to identify the submitted form. You can use a secondary data source or data from within your form to specify these three properties.&lt;/p&gt;
&lt;p&gt;The following steps will illustrate how to configure a Submit button to use DBXL’s Submit Document Web Service.&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp;Modify the form to incorporate a submit button&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a)&amp;nbsp;Click Controls in the right-hand task pane.&lt;br /&gt;b)&amp;nbsp;Click on Button. A button control will appear in your form’s view.&lt;br /&gt;c)&amp;nbsp;Double-click the button to display properties, as seen in Figure 1.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30058/original.aspx" alt="" /&gt;&lt;br /&gt;Figure 1&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;d)&amp;nbsp;Select Submit Options from the Action drop-down.&lt;br /&gt;e)&amp;nbsp;Click the button labeled Submit options.&lt;br /&gt;f)&amp;nbsp;Check the box labeled Allow users to submit this form. &lt;br /&gt;g)&amp;nbsp;From the Send form data to a single destination dropdown.&lt;br /&gt;h)&amp;nbsp;Select Web service from the options in the dropdown, as seen in Figure 2.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30059/original.aspx" alt="" /&gt;&lt;br /&gt;Figure 2&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;i)&amp;nbsp;Click Add to add a new data connection to your form.&lt;br /&gt;j)&amp;nbsp;Enter the name of the Qdabra DBXL Web Service. The URL is &lt;a href="http://%3cservername%3e/QdabraWebService/DBXLDocumentService.asmx"&gt;http://&amp;lt;servername&amp;gt;/QdabraWebService/DBXLDocumentService.asmx&lt;/a&gt;. Click Next. InfoPath will attempt to connect to the web service and show you a list of methods.&lt;br /&gt;k)&amp;nbsp;From the list of methods, select the operation named SubmitDocument and click Next.&lt;br /&gt;l)&amp;nbsp;Skip the first parameter. &lt;br /&gt;m)&amp;nbsp;Select the second parameter, named tns:xml. Select the Entire Form radio button and check the Submit as a string checkbox. The end result can be seen in Figure 3.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;img src="http://www.infopathdev.com/photos/dbxl_v22_documentation_images/images/30060/original.aspx" alt="" /&gt;&lt;br /&gt;Figure 3&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;n)&amp;nbsp;Select tns:name parameter. Select the radio button Field or group in the Parameters options section. Click the Modify button to the right of the textbox. In the Select a Field or Group dialog box, make sure the Main data source is selected. Select any field from your form; this will be stored as your form name. Click OK.&amp;nbsp;&amp;nbsp; &lt;br /&gt;o)&amp;nbsp;Repeat Step 13 for tns:author and tns:description, selecting fields in your form as appropriate.&lt;br /&gt;p)&amp;nbsp;Click Next. Click Finish. Click OK. Click OK.&lt;br /&gt;q)&amp;nbsp;Save the form and close InfoPath.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;2.&amp;nbsp;Modify the configuration in DAT&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a)&amp;nbsp;In the DAT, click Edit for the form’s configuration.&lt;br /&gt;b)&amp;nbsp;Attach the recently modified form and click Save.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;3.&amp;nbsp;Fill out and submit the form&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a)&amp;nbsp;Return to the configuration list and click on Open.&lt;br /&gt;b)&amp;nbsp;Fill out your form and click on your new Submit button.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;4.&amp;nbsp;Verify the result&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a)&amp;nbsp;Back in DAT, click to Edit the configuration.&lt;br /&gt;b)&amp;nbsp;Click on the Documents tab to verify that the data has been submitted.&lt;/p&gt;&lt;/blockquote&gt;</description><enclosure url="http://www.infopathdev.com/files/folders/30061/download.aspx" length="140800" type="application/octet-stream" /></item></channel></rss>