<?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>InfoPath Dev</title><link>http://www.infopathdev.com/blogs/</link><description>InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects.</description><dc:language>en-US</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>A space in the URL, encoded as %20, causes issues for QuerySharePoint</title><link>http://www.infopathdev.com/blogs/ernesto/archive/2010/03/05/a-space-in-the-url-encoded-as-20-causes-issues-for-querysharepoint.aspx</link><pubDate>Fri, 05 Mar 2010 15:10:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:52508</guid><dc:creator>ErnestoM</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;When using QueryBuilder and QuerySharePoint, you need to enter the URL to your SharePoint list. Internet Explorer encodes spaces as %20, but DBXL produces an error if you use a URL containing a %20.&lt;/p&gt;&lt;p&gt;The workaround is simply to replace %20 in the URL with an actual space. This works in QueryBuilder and in the InfoPath data connection wizard. &lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=52508" width="1" height="1"&gt;</description><category domain="http://www.infopathdev.com/blogs/ernesto/archive/tags/DBXL+v2.3/default.aspx">DBXL v2.3</category><category domain="http://www.infopathdev.com/blogs/ernesto/archive/tags/Querysharepoint/default.aspx">Querysharepoint</category></item><item><title>Form Detailing: Spring Cleaning for Your InfoPath Forms</title><link>http://www.infopathdev.com/blogs/jennifer/archive/2010/02/22/form-detailing.aspx</link><pubDate>Tue, 23 Feb 2010 03:15:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:52039</guid><dc:creator>Jennifer Walts</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;span style="FONT-FAMILY:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;FONT-SIZE:11pt;"&gt;For some of us, spring is in the air. We can’t help you clean the winter grime off your car, but we can help make your InfoPath form shine. Qdabra offers a detailing service&lt;span style="COLOR:#1f497d;"&gt;–&lt;/span&gt;you send us your InfoPath form templates and we analyze them and send you a detailed report. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-FAMILY:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;FONT-SIZE:11pt;"&gt;&lt;/span&gt;&lt;span style="FONT-FAMILY:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;FONT-SIZE:11pt;"&gt;Check us out on Twitter&lt;span style="COLOR:black;"&gt; – @InfoPathDev or @QdabraSoftware – and &lt;strong&gt;see how you can get your form detailed for free!&lt;/strong&gt; We will randomly select a&amp;nbsp; person who is following us and re-Tweets the offer. You get our compact form service, normally $95, where we review one form (one to three views and less than 40 fields) and send you a detailed report.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-FAMILY:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;FONT-SIZE:11pt;"&gt;&lt;span style="COLOR:black;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-FAMILY:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;FONT-SIZE:11pt;"&gt;Our reports contain:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="FONT-FAMILY:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;FONT-SIZE:11pt;"&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Best Practices - we list any best practices your form is missing. For example, is your data source well-structured?&lt;/font&gt;&lt;/font&gt;&lt;/li&gt;
&lt;li&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Performance - can your form&amp;#39;s performance be improved? We give you a quick summary of ways to make your form faster.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt;
&lt;li&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Cost of Ownership - how can you simplify your form to reduce maintenance costs down the road? We list several ways to simplify your form while not changing its functionality.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt;
&lt;li&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Security - does your form have security issues? We perform a quick threat analysis and send you results.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt;
&lt;li&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Visual Design - can you improve the look and usability of your form? Our UI gurus review your form’s look and feel and recommend improvements.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;span style="FONT-FAMILY:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;FONT-SIZE:11pt;"&gt;&lt;span style="FONT-FAMILY:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;FONT-SIZE:11pt;"&gt;See an example &lt;a href="http://www.qdabra.com/en/consulting/InfoPathDetailingService-Sample.pdf"&gt;report&lt;/a&gt; (PDF).&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-FAMILY:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;FONT-SIZE:11pt;"&gt;&lt;span style="FONT-FAMILY:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;FONT-SIZE:11pt;"&gt;Even if you are not selected&lt;b&gt;&lt;i&gt;&lt;span style="COLOR:#1f497d;"&gt; &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;to get the free detail service, you can still have your forms detailed. See more information and pricing &lt;a href="http://www.qdabra.com/en/consulting/detailingService.aspx"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=52039" width="1" height="1"&gt;</description></item><item><title>Removing qRules from a Form</title><link>http://www.infopathdev.com/blogs/hilary/archive/2010/02/05/removing-qrules-from-a-form.aspx</link><pubDate>Fri, 05 Feb 2010 16:48:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:51456</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Adding qRules to your form is simple -- just browse to your form and click &lt;strong&gt;Inject&lt;/strong&gt; and you are done! But what if you want to remove qRules for some reason?&lt;/p&gt;
&lt;p&gt;Currently, that is&amp;nbsp;a manual process, but it can be done.&lt;/p&gt;
&lt;p&gt;First, use the &lt;strong&gt;Logic Inspector&lt;/strong&gt; to find any rules that are using the Command node from the &lt;strong&gt;QdabraRules&lt;/strong&gt; data connection:&lt;br /&gt;&lt;img style="WIDTH:430px;HEIGHT:474px;" title="Logic Inspector" alt="Logic Inspector" src="http://www.infopathdev.com/blogs/hilary/Remove%20qRules/RemoveqRules1.png" width="430" height="474" /&gt;&lt;/p&gt;
&lt;p&gt;That will help you better understand what will need to change after you remove qRules. Next, you will need to remove one or two data connections, depending on your version of qRules. If you have the trial version, you&amp;#39;ll need to remove both the &lt;strong&gt;QdabraRules &lt;/strong&gt;and the &lt;strong&gt;QdabraVerification&lt;/strong&gt; data connections. If you are using a purchased version, you will only need to remove the &lt;strong&gt;QdabraRules &lt;/strong&gt;data connection:&lt;br /&gt;&lt;img style="WIDTH:440px;HEIGHT:439px;" title="Data Connections" alt="Data Connections" src="http://www.infopathdev.com/blogs/hilary/Remove%20qRules/RemoveqRules2.png" width="440" height="439" /&gt;&lt;/p&gt;
&lt;p&gt;Next, navigate to &lt;strong&gt;Tools / Resource Files&lt;/strong&gt;:&lt;br /&gt;&lt;img style="WIDTH:221px;HEIGHT:382px;" title="Resource Files" alt="Resource Files" src="http://www.infopathdev.com/blogs/hilary/Remove%20qRules/RemoveqRules3.png" width="221" height="382" /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Remove the &lt;strong&gt;QdabraRules.xml&lt;/strong&gt; file:&lt;br /&gt;&lt;img style="WIDTH:321px;HEIGHT:291px;" title="Resource File" alt="Resource File" src="http://www.infopathdev.com/blogs/hilary/Remove%20qRules/RemoveqRules4.png" width="321" height="291" /&gt;&lt;/p&gt;
&lt;p&gt;Finally, we need to remove the .dll that contains the qRules logic. The easiest way to do this is to add code to your form. For example, add a loading event:&lt;br /&gt;&lt;img style="WIDTH:625px;HEIGHT:454px;" title="Loading Event" alt="Loading Event" src="http://www.infopathdev.com/blogs/hilary/Remove%20qRules/RemoveqRules5.png" width="625" height="454" /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Close the &lt;strong&gt;Microsoft Visual Studio Tools for Applications&lt;/strong&gt; window that opens after adding the event, then navigate to &lt;strong&gt;Tools / Form Options&lt;/strong&gt;:&lt;br /&gt;&lt;img style="WIDTH:226px;HEIGHT:385px;" title="Tools Form Options" alt="Tools Form Options" src="http://www.infopathdev.com/blogs/hilary/Remove%20qRules/RemoveqRules6.png" width="226" height="385" /&gt;&lt;/p&gt;
&lt;p&gt;Go to the &lt;strong&gt;Programming&lt;/strong&gt; category, select the &lt;strong&gt;Remove Code&lt;/strong&gt; buttton to remove all code from your form:&lt;br /&gt;&lt;img style="WIDTH:612px;HEIGHT:364px;" title="Remove Code" alt="Remove Code" src="http://www.infopathdev.com/blogs/hilary/Remove%20qRules/RemoveqRules7.png" width="612" height="364" /&gt;&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=51456" width="1" height="1"&gt;</description></item><item><title>Qdabra’s AdUserInfo XTP</title><link>http://www.infopathdev.com/blogs/mel_balsamo/archive/2010/02/04/qdabra-s-aduserinfo-xtp.aspx</link><pubDate>Thu, 04 Feb 2010 09:11:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:51408</guid><dc:creator>Mel Balsamo</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Qdabra’s AdUserInfo template part is useful for solutions that require sending of forms via email. Populate your ‘From’ and ‘To’ fields with valid email addresses that are retrieved from the Active Directory.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;HOW IT WORKS&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is how the template part looks in InfoPath Preview mode:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/aduserinfoxtp/Figure01.png" /&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Clicking the ‘Click to Get Your Info’ button retrieves the current user’s AD information and stores the name, alias and email address in the XML.&lt;/p&gt;
&lt;p&gt;In the text box on the right, enter a valid alias for the user you wish to send email to. After tabbing out, that user’s AD info is retrieved using Qdabra’s Active Directory Web Service. This way, we are assured that the form will be sent to a valid email address.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/aduserinfoxtp/Figure02.png" /&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;HOW TO ADD THE XTP IN INFOPATH&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Launch InfoPath and select &lt;strong&gt;Design a Form Template&lt;/strong&gt; based on a new blank one.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Controls&lt;/strong&gt; taskpane, click &lt;strong&gt;Add or Remove Custom Controls…&lt;/strong&gt;&amp;nbsp;&lt;/li&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/aduserinfoxtp/Figure03.png" /&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;li&gt;In the Custom Controls dialog box, click &lt;strong&gt;Add&lt;/strong&gt; &amp;gt; &lt;strong&gt;Template Part&lt;/strong&gt;, and browse to the location where you placed your AdUserInfo XTP.&amp;nbsp;&lt;/li&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/aduserinfoxtp/Figure04.png" /&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;li&gt;Verify that the XTP has been added to your &lt;strong&gt;Custom Controls&lt;/strong&gt; taskpane.&amp;nbsp;&lt;/li&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/aduserinfoxtp/Figure05.png" /&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;li&gt;Drag the XTP from taskpane to your canvas. You will see the following section:&amp;nbsp;&lt;/li&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/aduserinfoxtp/Figure06.png" /&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Your Main Data Source should look similar to this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/aduserinfoxtp/Figure07.png" /&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;li&gt;Go to &lt;strong&gt;Tools&lt;/strong&gt; &amp;gt; &lt;strong&gt;Data Connections&lt;/strong&gt;. You will see that there are two data connections that got added as well.&lt;/li&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/aduserinfoxtp/Figure08.png" /&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;These data connections retrieve data using Qdabra’s Active Directory Web Service. If you already have &lt;a href="http://www.qdabra.com/en/products/DBXL.aspx" target="_blank"&gt;DBXL&lt;/a&gt; installed, you can use the AD web service that comes with it.&lt;/p&gt;
&lt;li&gt;Modify the data connections and replace the URLs to point to the location of your web service installation, i.e. &lt;em&gt;http://&amp;lt;YourServerName&amp;gt;/QdabraWebService/AdUserInfo.asmx&lt;/em&gt;. If you are using Qdabra’s &lt;a href="http://www.qdabra.com/en/products/ADWebService.aspx" target="_blank"&gt;AD Standalone Tool&lt;/a&gt;, replace the web service URL in the format: &lt;em&gt;http://&amp;lt;YourServerName&amp;gt;/QdabraAD/AdUserInfo.asmx&lt;/em&gt;.&lt;/li&gt;
&lt;p&gt;As you modify your data connections, you might want to remove &lt;strong&gt;‘_AdUserInfo&lt;/strong&gt;’ in the data connection names. Those got appended when you injected the XTPs.&lt;/p&gt;&lt;/ol&gt;
&lt;p&gt;When done with the above steps, you can start testing your form template in Preview mode.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Download Qdabra&amp;#39;s AD User Info XTP for FREE &lt;/strong&gt;&lt;a href="http://www.qdabra.com/en/products/ADUserInfoXTP.aspx"&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=51408" width="1" height="1"&gt;</description><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/DBXL/default.aspx">DBXL</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/template+part/default.aspx">template part</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/XTP/default.aspx">XTP</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/Active+Directory/default.aspx">Active Directory</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/InfoPath/default.aspx">InfoPath</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/email/default.aspx">email</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/aduserinfo/default.aspx">aduserinfo</category></item><item><title>InfoPath gaps in SharePoint and SQL</title><link>http://www.infopathdev.com/blogs/patrick/archive/2010/01/29/infopath-gaps-in-sharepoint-and-sql.aspx</link><pubDate>Fri, 29 Jan 2010 08:31:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:51137</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><description>&lt;font size="3" face="Calibri"&gt;
&lt;p&gt;Here’s a &lt;b&gt;brief summary of InfoPath gaps in SharePoint and SQL integration&lt;/b&gt; for out-of-box solutions (assumes no code added to InfoPath form nor SharePoint):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SharePoint limitations 
&lt;ul&gt;
&lt;li&gt;SharePoint views &lt;font color="#ff0000"&gt;cannot be configured to show repeating data from an XML form&lt;/font&gt;.&lt;/li&gt;
&lt;li&gt;&lt;font color="#ff0000"&gt;Document level permissions&lt;/font&gt; – you &lt;b&gt;can&lt;/b&gt; manually set permissions in SharePoint for documents, but &lt;font color="#ff0000"&gt;controlling permissions based on document level fields cannot be done&lt;/font&gt;.&lt;/li&gt;
&lt;li&gt;SharePoint &lt;font color="#ff0000"&gt;list view performance degrades after ~3000 forms&lt;/font&gt;. This is a &lt;a href="http://mo.notono.us/2008/09/moss-goodbye-2000-limit-hello-3000.html" target="_blank"&gt;known limitation&lt;/a&gt; in SharePoint. Not a limitation if the data is in SQL. Workarounds include: 
&lt;ul&gt;
&lt;li&gt;Archive forms so you have &amp;lt;3000 active. Not a solution if you need to see all of them.&lt;/li&gt;
&lt;li&gt;Restrict views to show very few forms and enable paging. Once again, can’t see all forms.&lt;/li&gt;
&lt;li&gt;Submit forms to a separate database via a Web Service and use BDC Web part with filtering and paging to quickly view data&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Submit performance is slower (~4x slower) going to SharePoint than to a Web Service. Click &lt;a href="http://www.infopathdev.com/blogs/ernesto/archive/2009/01/07/dbxl-v2-3-performance-analysis.aspx" target="_blank"&gt;here&lt;/a&gt; for more details.&lt;/li&gt;
&lt;li&gt;&lt;font color="#ff0000"&gt;No support to search for users&lt;/font&gt; in Active Directory or SharePoint user list. Call GetUserProfile to set user, but can’t check for group membership or get other Active Directory properties.&lt;/li&gt;
&lt;li&gt;&lt;font color="#ff0000"&gt;No dynamic filtering for SharePoint lists&lt;/font&gt; – populating dropdowns pull all data down from the SharePoint list leading to slow form load times. Filtering via OWSSVR is hardcoded (not dynamic).&lt;/li&gt;
&lt;li&gt;&lt;font color="#ff0000"&gt;Number of columns limited&lt;/font&gt; to fixed numbers. Using Web Service with SQL and BDC solves this scenario.&lt;/li&gt;
&lt;li&gt;SharePoint out-of-box &lt;font color="#ff0000"&gt;search does not support wildcard searches&lt;/font&gt; for forms (details). You can’t search for App* and find both Apple and Application..&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;SQL Database integration issues 
&lt;ul&gt;
&lt;li&gt;&lt;font color="#ff0000"&gt;No database support&lt;/font&gt; for forms created first using XML. Requires total rewrite.&lt;/li&gt;&lt;span style="TEXT-DECORATION:underline;"&gt;If you create a form from a database first, you would have the following limitations:&lt;/span&gt; 
&lt;li&gt;Adding fields to data source don’t show up in new SQL columns. You’d have to add to SQL first and then convert your main data source. &lt;font color="#ff0000"&gt;Previous XML data would not migrate forward&lt;/font&gt;.&lt;/li&gt;
&lt;li&gt;Changes to DB schema &lt;font color="#ff0000"&gt;will invalidate previously saved XML files&lt;/font&gt; in SharePoint.&lt;/li&gt;
&lt;li&gt;Images, rich text, and other &lt;font color="#ff0000"&gt;non-SQL data types cannot be saved&lt;/font&gt; to SQL. Must be saved in XML but then you have migration issues per previous two bullets.&lt;/li&gt;
&lt;li&gt;&lt;font color="#ff0000"&gt;No server-side dynamic filtering&lt;/font&gt; when populating dropdown values with SQL queries. If the SQL table is large, it could take a very long time and time out.&lt;/li&gt;
&lt;li&gt;&lt;font color="#ff0000"&gt;No locking of data&lt;/font&gt; submitted to SQL – multiple writes could happen if two people open the same form. Last writer wins.&lt;/li&gt;
&lt;li&gt;No dynamic role-based permissions – you have to add users and/or groups to SQL manually and specify READER or WRITER. Can’t dynamically determine reader and writer based on field value.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;Without SQL, you have &lt;font color="#ff0000"&gt;Reporting Issues&lt;/font&gt; 
&lt;ul&gt;
&lt;li&gt;Reporting would be flat – &lt;font color="#ff0000"&gt;repeating data cannot be aggregated in a report&lt;/font&gt;. You would need to move the data to a database or create an XML query tool on top of your XML files which would likely be a solution specific to one XSN, i.e. schema-dependent not general.&lt;/li&gt;
&lt;li&gt;Export to Excel not supported for more than one repeating section and not feasible for more than 10-20 XMLs at a time.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;b&gt;Qdabra’s &lt;a title="DBXL Web Service" href="http://www.qdabra.com/en/products/DBXL.aspx" target="_blank"&gt;DBXL Web Service&lt;/a&gt; fills all of the above gaps.&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;/font&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=51137" width="1" height="1"&gt;</description></item><item><title>DBXL Sharepoint Mapping: When Object Model should work but doesn’t</title><link>http://www.infopathdev.com/blogs/ernesto/archive/2010/01/22/dbxl-sharepoint-mapping-when-object-model-should-work-but-doesn-t.aspx</link><pubDate>Fri, 22 Jan 2010 19:55:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50931</guid><dc:creator>ErnestoM</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;When creating a Sharepoint mapping from the DBXL Administration Tool (DAT) you have two options: Object Model and Web Service. Web Service is required when the Sharepoint instance lies on a different server. However, we have seen instances where Object Model produces an error, even though DBXL and Sharepoint are on the same machine.&lt;/p&gt;&lt;p&gt;How do you know if you’re in this situation?&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Add a Sharepoint mapping. Select Web service. Save the document type. Add documents and verify that everything works as expected.&lt;/li&gt;&lt;li&gt;Edit the same doctype to use Object Model. When you click Save in DAT you get this:&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/50930/original.aspx" alt="" /&gt;&lt;/p&gt;&lt;p&gt;Simply using Web Service is an acceptable workaround for some people. But if you wish to use IPFS (browser enabled forms) you’ll need to use Object Model. So how do we fix this?&lt;/p&gt;&lt;p&gt;When faced with this scenario please check the Applications eventlog. It is our experience that we find a SharePoint error with Network Service not having permission to access the Sharepoint database.&amp;nbsp; Evidently, the object model does direct database access. To fix this, switch DBXL to use the same identity as the SharePoint app pool.&lt;br /&gt;&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=50931" width="1" height="1"&gt;</description><category domain="http://www.infopathdev.com/blogs/ernesto/archive/tags/DBXL+v2.3/default.aspx">DBXL v2.3</category></item><item><title>Qdabra's Image Picker Template Part</title><link>http://www.infopathdev.com/blogs/mel_balsamo/archive/2010/01/11/qdabra-s-imagepicker-xtp.aspx</link><pubDate>Mon, 11 Jan 2010 08:34:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50486</guid><dc:creator>Mel Balsamo</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;b&gt;SCENARIO&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;You want to add images to your InfoPath form, but:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Image attachments, even those that are embedded in the form, get stored in the XML itself, thus making its file size huge.&lt;/li&gt;

&lt;li&gt;Your images are stored in a SharePoint list and cannot be retrieved via filters without using code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;b&gt;SOLUTION&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Install Qdabra’s Image Picker template part!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Based on Qdabra’s qRules library – extend your InfoPath forms without writing code&lt;/li&gt;

&lt;li&gt;Easy-to-add XML Template Part – just add custom control via the InfoPath 2007 Designer&lt;/li&gt;

&lt;li&gt;Comes with pre-configured layout which saves you time – just drag and drop from the taskpane&lt;/li&gt;

&lt;li&gt;Less file size since no images are attached nor embedded in the XML – the images are loaded from the external SharePoint file.&lt;/li&gt;

&lt;li&gt;Able to query images from a SharePoint list – filter using image tags for easy searching, without code!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;i&gt;Note that the QdImagePicker XTP uses a picture control to hold the images. Since picture controls are not supported in InfoPath Forms Services (IPFS), the template part will not work in the browser.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;QUICK PREVIEW&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Let’s take a quick look: here is a screenshot of Qdabra’s ImagePicker XTP:&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure01.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;In the screenshot above, the user searched for images that were tagged with ‘Logo’ as the Subject and returned two images. The user then clicked on the ‘View’ link for the first entry to display the actual image as well as its properties, as shown below:&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure02.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;Clicking on the ‘Use Selected Image’ button leaves the image on the form and a button that lets the user pick a different image.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure03.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;The ‘Add’ tab becomes handy if the user wants an image that is not in the SharePoint list, but is on his network or local machine. Simply add the image to the picture control and click ‘Use This Image’.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure04.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;The newly-added image is then uploaded to your SharePoint library/list.&lt;/p&gt;&lt;p&gt;This blog post details the steps needed before you begin using the XTP in your InfoPath forms; just a few modifications and you’re ready to go!&lt;/p&gt;

&lt;p&gt;&lt;b&gt;REQUIREMENTS&lt;/b&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;b&gt;QdImagePickerXTP&lt;/b&gt; – Image Picker template part. Download it &lt;b&gt;FREE&lt;/b&gt; &lt;a href="http://www.qdabra.com/en/products/qdimagepicker.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/li&gt;

&lt;li&gt;&lt;b&gt;InfoPath 2007&lt;/b&gt; – template parts (XTPs) are not supported in InfoPath 2003.&lt;/li&gt;

&lt;li&gt;&lt;b&gt;Qdabra qRules v2.0&lt;/b&gt; – add the most commonly requested InfoPath features without the need of writing code. Download a &lt;b&gt;FREE&lt;/b&gt; trial &lt;a href="http://www.qdabra.com/en/products/download/qRulesTrial.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/li&gt;

&lt;li&gt;A &lt;b&gt;SharePoint list&lt;/b&gt; to retrieve and submit images to.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;b&gt;SET UP A SHAREPOINT LIST WITH IMAGES&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;1. In your SharePoint site, create a list. For the purposes of this tutorial, name your list &lt;b&gt;ImagePickerList&lt;/b&gt;.&lt;/p&gt;

&lt;p&gt;2. Add the following columns:&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure05.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;3. In your main &lt;b&gt;ImagePickerList&lt;/b&gt; view, i.e. &lt;i&gt;http://&amp;lt;SharePoinSite&amp;gt;/Lists/ImagePickerList/AllItems.aspx&lt;/i&gt;, click on the ‘All Items’ dropdown and select ‘Modify this View’.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure06.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;4. In the ‘Edit View’ page, ‘Columns’ section, enable only the following columns and (optional) sort them as shown below:&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure07.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;5. Click &lt;b&gt;OK&lt;/b&gt; when done.&lt;/p&gt;

&lt;p&gt;6. Back in your ImagePickerList view, click &lt;b&gt;New &amp;gt; New Item&lt;/b&gt;.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure08.png" alt="" width="266" height="101" /&gt;&lt;/p&gt;

&lt;p&gt;7. In the ‘New Item’ page, fill out all the fields, like such:&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure09.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;&lt;i&gt;Hints:&lt;/i&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Subject&lt;/b&gt; – this is the main tag used in the QdImagePicker XTP when searching for images. Since in your XTP, the &lt;b&gt;Subject&lt;/b&gt; dropdown list box uses the following entries: &lt;i&gt;Animals, Business, Family, Landscape, Logo, People, Travel, &lt;/i&gt;and &lt;i&gt;Other&lt;/i&gt;; make sure to tag your images using only one of these values.&lt;/li&gt;

&lt;li&gt;&lt;b&gt;IsPrivate&lt;/b&gt; – can either be ‘true’ or ‘false’.&lt;/li&gt;

&lt;li&gt;&lt;b&gt;Image&lt;/b&gt; – the URL to the image 
&lt;ul&gt;
&lt;li&gt;If you have an existing image that’s already uploaded on the web, simply enter the full image URL (e.g. &lt;a href="http://images.google.com/intl/en_ALL/images/logos/images_logo_lg.gif"&gt;http://images.google.com/intl/en_ALL/images/logos/images_logo_lg.gif&lt;/a&gt;) in the &lt;b&gt;Image&lt;/b&gt; field:&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p style="padding-left:90px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure10.png" alt="" /&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&amp;nbsp; 
&lt;ul&gt;
&lt;li&gt;If you wish to upload an image from your network or local machine:&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p style="padding-left:90px;"&gt;a. Leave the &lt;b&gt;Image&lt;/b&gt; field blank for now.&lt;/p&gt;

&lt;p style="padding-left:90px;"&gt;b. Click on the ‘Attach File’ link in the New Item page&lt;/p&gt;

&lt;p style="padding-left:120px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure11.png" alt="" /&gt;&lt;/p&gt;

&lt;p style="padding-left:90px;"&gt;c. Browse to the image and click &lt;b&gt;OK&lt;/b&gt;.&lt;/p&gt;

&lt;p style="padding-left:120px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure12.png" alt="" /&gt;&lt;/p&gt;

&lt;p style="padding-left:90px;"&gt;The ‘Attachments’ field will now appear in your ‘New Item’ page:&lt;/p&gt;

&lt;p style="padding-left:120px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure13.png" alt="" /&gt;&lt;/p&gt;

&lt;p style="padding-left:90px;"&gt;Note that the Image field will remain blank.&lt;/p&gt;

&lt;p style="padding-left:90px;"&gt;d. Click &lt;b&gt;OK&lt;/b&gt;.&lt;/p&gt;

&lt;p style="padding-left:90px;"&gt;e. Back in your list main view, click on the Title dropdown of your newly-added image and select ‘Edit Item’.&lt;/p&gt;

&lt;p style="padding-left:120px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure14.png" alt="" /&gt;&lt;/p&gt;

&lt;p style="padding-left:90px;"&gt;f. You will be taken to the ‘Edit Item’ page where you’ll see the image attachment filename which now shows as a hyperlink. Right-click on the link and select ‘Copy Shortcut’ to place the image URL in your clipboard.&lt;/p&gt;

&lt;p style="padding-left:120px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure15.png" alt="" /&gt;&lt;/p&gt;

&lt;p style="padding-left:90px;"&gt;g. Paste the image URL in the &lt;b&gt;Image&lt;/b&gt; field:&lt;/p&gt;

&lt;p style="padding-left:120px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure16.png" alt="" /&gt;&lt;/p&gt;

&lt;p style="padding-left:90px;"&gt;h. Click &lt;span style="font-weight:bold;"&gt;OK&lt;/span&gt;.&lt;/p&gt;

&lt;p&gt;You now have your first Image item in your SharePoint list:&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure17.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;You would want to add more images to this list so that when you begin using your QdImagePicker XTP in your forms, you will have a couple of images to pick from. We recommend adding the images that you use most of the time, such as company logos, banners, signatures, etc.&lt;/p&gt;

&lt;p&gt;For the purposes of this tutorial, we will use the following entries in our SharePoint list:&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure18.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;ADD THE TEMPLATE PART IN INFOPATH CUSTOM CONTROLS&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;1. Launch InfoPath and select &lt;b&gt;Design a Form Template&lt;/b&gt; based on a new blank one.&lt;/p&gt;

&lt;p&gt;2. In the &lt;b&gt;Controls&lt;/b&gt; taskpane, click &lt;b&gt;Add or Remove Custom Controls…&lt;/b&gt;&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure19.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;3. In the Custom Controls dialog box, click &lt;b&gt;Add &amp;gt; Template Part&lt;/b&gt;, and browse to the location where you placed your QdImagePicker XTP.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure20.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;4. Verify that the XTP has been added to your &lt;b&gt;Custom Controls&lt;/b&gt; taskpane.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure21.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;5. Save your &lt;span style="text-decoration:underline;"&gt;blank&lt;/span&gt; form template (XSN). For the purposes of this blog post, we will name it as &lt;i&gt;ImagePickerXSN&lt;/i&gt;.&lt;/p&gt;

&lt;p&gt;6. Close InfoPath.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;INJECT QRULES AND THE XTP IN YOUR FORM TEMPLATE&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;1. Launch the qRules Injector from &lt;i&gt;Start &amp;gt; All Programs &amp;gt; Qdabra &amp;gt; Tools &amp;gt; qRules Injector&lt;/i&gt;.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure22.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;2. Browse to the location where you saved your &lt;i&gt;ImagePickerXSN&lt;/i&gt;.&lt;/p&gt;

&lt;p&gt;3. Click &lt;b&gt;Inject&lt;/b&gt;, then &lt;b&gt;OK&lt;/b&gt; in the confirmation dialog, and then close the qRules Injector.&lt;/p&gt;

&lt;p&gt;4. Open &lt;i&gt;ImagePickerXSN&lt;/i&gt; in InfoPath Design mode.&lt;/p&gt;

&lt;p&gt;5. Scroll down to the very bottom of the &lt;b&gt;Controls&lt;/b&gt; taskpane to get to the &lt;b&gt;Custom&lt;/b&gt; section, and then click on the &lt;b&gt;QdImagePicker&lt;/b&gt; control.&lt;/p&gt;

&lt;p&gt;You should now have the template part on your canvas. The main and the secondary data sources will be injected in your XSN as well.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;SOURCE FILES CLEAN-UP&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;If you go to &lt;b&gt;Tools &amp;gt; Data Connections&lt;/b&gt;, you will notice that you have two instances of &lt;b&gt;QdabraRules&lt;/b&gt;, one for the XSN, and one for the XTP:&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure23.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;When you first injected qRules in your XSN, it added the QdabraRules XML as a secondary data source. In this same XSN, you injected the &lt;i&gt;QdImagePicker&lt;/i&gt; XTP which also uses qRules. This added another QdabraRules XML secondary data source to the XSN (with a different name). So now, you have two qRules XMLs, which is confusing and might cause issues when calling the qRules commands. Unfortunately, there is no workaround at the moment, hence the need to do some clean-up.&lt;/p&gt;

&lt;p&gt;1. Save &lt;i&gt;ImagePickerXSN&lt;/i&gt; as source files and close InfoPath.&lt;/p&gt;

&lt;p&gt;2. Modify the &lt;b&gt;manifest.xsf&lt;/b&gt; file:&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;a. In the directory where you saved your source files, locate manifest.xsf and open it in any text editor.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;b. Replace all eight instances of “&lt;b&gt;QdabraRules_QdImagePicker&lt;/b&gt;” with “&lt;b&gt;QdabraRules&lt;/b&gt;”.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;c. Delete the associated blocks where you find “&lt;b&gt;QdabraRules1&lt;/b&gt;”:&lt;/p&gt;

&lt;p style="padding-left:60px;"&gt;i. xsf:file (for .xsd)&lt;/p&gt;

&lt;p style="padding-left:90px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure24.png" alt="" /&gt;&lt;/p&gt;

&lt;p style="padding-left:60px;"&gt;ii. xsf:file (for .xml)&lt;/p&gt;

&lt;p style="padding-left:90px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure25.png" alt="" /&gt;&lt;/p&gt;

&lt;p style="padding-left:60px;"&gt;iii. xsf:dataObject&lt;/p&gt;

&lt;p style="padding-left:90px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure26.png" alt="" /&gt;&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;d. Save and close manifest.xsf.&lt;/p&gt;

&lt;p&gt;3. Modify the &lt;b&gt;view1.xsl&lt;/b&gt; file.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;a. Open view1.xsl in a text editor.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;b. Replace the two instances of “QdabraRules_QdImagePicker” with “QdabraRules”.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;c. Save and close view1.xsl.&lt;/p&gt;

&lt;p&gt;4. Modify the &lt;b&gt;sampledata.xml&lt;/b&gt; file&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;a. Open sampledata.xml in a text editor.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;b. Delete the xd:DataConnection block where you find “&lt;b&gt;QdabraRules_QdImagePicker&lt;/b&gt;”.&lt;/p&gt;

&lt;p style="padding-left:60px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure27.png" alt="" /&gt;&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;c. Save and close sampledata.xml.&lt;/p&gt;

&lt;p&gt;5. Delete the extraneous &lt;b&gt;QdabraRules1 &lt;/b&gt;files in the source files directory:&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;a. QdabraRules1.xml&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;b. QdabraRules1.xsd&lt;/p&gt;

&lt;p&gt;6. Verify changes.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;a. Open manifest.xsf in InfoPath Design mode.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;b. Go to &lt;b&gt;Tools &amp;gt; Data Connections&lt;/b&gt; and verify that you now have only one instance of &lt;b&gt;QdabraRules&lt;/b&gt;.&lt;/p&gt;

&lt;p style="padding-left:60px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure28.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;7.&amp;nbsp;Modify the qtpFormLogic data connection and remove the &lt;i&gt;_QdImagePicker&lt;/i&gt; suffix in its name.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;ADD A DATA CONNECTION THAT FILTERS DATA FROM YOUR SHAREPOINT LIST&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;The owssvr dll file comes with SharePoint. Clever people have been creating filtered SharePoint data queries by using this DLL. The Qdabra qRules command called FilterOwssvr attempts to make it easier to filter data from a SharePoint list and use it in your InfoPath form.&lt;/p&gt;

&lt;p&gt;Before we start we need to locate a few values that we’ll need during this tutorial:&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;A. &lt;b&gt;Owssvr.dll&lt;/b&gt; - On MOSS 2007, this file is located at the following URL: &lt;i&gt;&lt;font color="#0000ff"&gt;&lt;b&gt;http://&amp;lt;SharePointSite&amp;gt;/_vti_bin/owssvr.dll&lt;/b&gt;&lt;/font&gt;&lt;/i&gt;.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;B. &lt;b&gt;List ID&lt;/b&gt; – Open the list in Internet Explorer, select &lt;b&gt;Settings&lt;/b&gt; and &lt;b&gt;List Settings&lt;/b&gt;. You’ll see a URL that looks like this: &lt;b&gt;&lt;i&gt;http://&amp;lt;SharePointSite&amp;gt;/_layouts/listedit.aspx?List&lt;font color="#ff0000"&gt;&lt;font color="#000000"&gt;=&lt;/font&gt;&lt;font color="#ff0000"&gt;%&lt;/font&gt;7B51964A2F%2D1C71%2D4C1C%2D969E%2DF5C9764B312B%7D&lt;/font&gt;&lt;/i&gt;&lt;/b&gt;. The List ID is in red, but we need to decode it to obtain the Guid. You can use an online tool such as http://meyerweb.com/eric/tools/dencoder/ to obtain the Guid, which in this case is &lt;font color="#ff0000"&gt;&lt;i&gt;&lt;b&gt;{51964A2F-1C71-4C1C-969E-F5C9764B312B&lt;/b&gt;&lt;/i&gt;&lt;/font&gt;&lt;font color="#ff0000"&gt;&lt;i&gt;&lt;b&gt;}&lt;/b&gt;&lt;/i&gt;&lt;/font&gt;&lt;font color="#000000"&gt;.&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;Now that we have these values, we can set up our form to receive data from this list.&lt;/p&gt;

&lt;p&gt;1. Confirm your values visually in Internet Explorer by navigating to &lt;b&gt;&lt;i&gt;&lt;font color="#0000ff"&gt;http://&amp;lt;SharePointSite&amp;gt;/_vti_bin/owssvr.dll&lt;/font&gt;?Cmd=Display&amp;amp;List=&lt;font color="#ff0000"&gt;{&lt;/font&gt;&lt;font color="#ff0000"&gt;51964A2F-1C71-4C1C-969E-F5C9764B312B}&lt;/font&gt;&lt;font color="#000000"&gt;&amp;amp;XMLDATA=TRUE&lt;/font&gt;&lt;/i&gt;&lt;/b&gt;. You’ll see something like this:&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure29.png" border="1" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;2. In your &lt;i&gt;ImagePickerXSN&lt;/i&gt; form template, go to &lt;b&gt;Tools &amp;gt; Data Connections&lt;/b&gt;.&lt;/p&gt;

&lt;p&gt;3. Click &lt;b&gt;Add&lt;/b&gt;, and follow the wizard to create a data connection that receives data from an XML document, and enter the full URL we accessed in Step 1, i.e. &lt;b&gt;&lt;i&gt;&lt;font color="#0000ff"&gt;http://&amp;lt;SharePointSite&amp;gt;/_vti_bin/owssvr.dll&lt;/font&gt;?Cmd=Display&amp;amp;List=&lt;font color="#ff0000"&gt;{&lt;/font&gt;&lt;font color="#ff0000"&gt;51964A2F-1C71-4C1C-969E-F5C9764B312B}&lt;/font&gt;&lt;font color="#000000"&gt;&amp;amp;XMLDATA=TRUE&lt;/font&gt;&lt;/i&gt;&lt;/b&gt;.&lt;/p&gt;

&lt;p&gt;4. Continue the wizard, making sure to select ‘Access the data from the specified location’.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure30.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;5. Click &lt;b&gt;Next&lt;/b&gt;. We’ll name this data connection ‘FilterImages’ and uncheck the box ‘Automatically retrieve data when form is opened’.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure31.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;6. Click &lt;b&gt;Finish&lt;/b&gt;, and then &lt;b&gt;Close&lt;/b&gt; to exit out of the wizard.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;RE-BIND SECTIONS TO THE FILTERIMAGES DATA SOURCE&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;These sections of the QdImagePicker XTP are bound to the qtpFormLogic secondary data connection.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure32.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;These sections will hold our SharePoint list images and details. We then need to re-bind them, including the fields, to the ‘FilterImages’ secondary data source.&lt;/p&gt;

&lt;p&gt;1. Start from the outermost section; right-click on it and select ‘Change Binding’.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure33.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;2. Select ‘FilterImages (Secondary)’ from the ‘Data source’ dropdown and click on the &lt;b&gt;&lt;i&gt;rs:data&lt;/i&gt;&lt;/b&gt; node, then click &lt;b&gt;OK&lt;/b&gt;.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure34.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;3. Next, re-bind the repeating section; right-click on it and select ‘Change Binding’, then select the &lt;b&gt;&lt;i&gt;z:row&lt;/i&gt;&lt;/b&gt; repeating node.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure35.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;4. Do the same for the innermost section; right-click and select ‘Change Binding’, then bind it to the &lt;b&gt;&lt;i&gt;z:row&lt;/i&gt;&lt;/b&gt; repeating node.&lt;/p&gt;

&lt;p&gt;You should now have all the three sections bound to the ‘FilterImages’ data source:&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure36.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;5. Next, we will modify the expression boxes to point to the nodes in our ‘FilterImages’ data source since these nodes are actually the columns in our SharePoint list. Do this by double-clicking on each expression box, clicking on the &lt;b&gt;&lt;i&gt;fx&lt;/i&gt;&lt;/b&gt; button under the ‘General’ tab and entering the formula as follows (Note that the underlined fields point to the ‘FilterImages’ secondary data source nodes):&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;a. &lt;b&gt;Date&lt;/b&gt; – substring-before(&lt;span style="text-decoration:underline;"&gt;@ows_Date_x0020_Taken&lt;/span&gt;, &amp;quot; 00:00:00&amp;quot;)&lt;/p&gt;

&lt;p style="padding-left:60px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure37.png" alt="" /&gt;&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;b. &lt;b&gt;Title&lt;/b&gt; – &lt;span style="text-decoration:underline;"&gt;@ows_LinkTitle&lt;/span&gt;&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;c. &lt;b&gt;Subject&lt;/b&gt; – &lt;span style="text-decoration:underline;"&gt;@ows_Subject&lt;/span&gt;&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;d. &lt;b&gt;Location&lt;/b&gt; – &lt;span style="text-decoration:underline;"&gt;@ows_Location&lt;/span&gt;&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;e. &lt;b&gt;Creator&lt;/b&gt; – &lt;span style="text-decoration:underline;"&gt;@ows_Creator&lt;/span&gt;&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;f. &lt;b&gt;Copyright&lt;/b&gt; – &lt;span style="text-decoration:underline;"&gt;@ows_Copyright&lt;/span&gt;&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;g. &lt;b&gt;Private&lt;/b&gt; – select ‘Text’ under the ‘General’ tab and on your keyboard, hold &lt;b&gt;Alt + 129&lt;/b&gt; (numeric keypad) to get &lt;span style="font-weight:bold;"&gt;ü&lt;/span&gt; and display a check mark. If you are using a non-English OS keyboard, simply copy &lt;span style="font-weight:bold;"&gt;ü&lt;/span&gt; and paste it in the ‘Text’ field.&lt;/p&gt;

&lt;p style="padding-left:60px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure38.png" alt="" /&gt;&lt;/p&gt;

&lt;p style="padding-left:60px;"&gt;Go to the Display tab &amp;gt; Conditional Formatting &amp;gt; Add and add the condition &lt;span style="text-decoration:underline;"&gt;&lt;b&gt;ows_IsPrivate&lt;/b&gt;&lt;/span&gt; ‘&lt;b&gt;is not equal to&lt;/b&gt;’ “&lt;b&gt;true&lt;/b&gt;” (entered as text), to hide the control.&lt;/p&gt;

&lt;p style="padding-left:60px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure39.png" alt="" /&gt;&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;h. &lt;b&gt;ID&lt;/b&gt; – &lt;span style="text-decoration:underline;"&gt;@ows_ID&lt;/span&gt;&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;i. &lt;b&gt;Image&lt;/b&gt; (picture control) – &lt;span style="text-decoration:underline;"&gt;@ows_Image&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;MODIFY THE FORM LOGIC&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;First, we need to change the rules that call the &lt;b&gt;FilterOwssvr&lt;/b&gt; qRules command that are present in the ‘Search’ button.&lt;/p&gt;

&lt;p&gt;1. Double-click on the ‘Search’ button and click ‘Rules’. The last two rules in this button are the ones that use the ‘FilterOwssvr’ command.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure40.png" border="1" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;2. Double-click on the second rule (&lt;i&gt;No Date Taken&lt;/i&gt;), modify the action and click on the &lt;b&gt;&lt;i&gt;fx&lt;/i&gt;&lt;/b&gt; button.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure41.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;3. We already have the correct command syntax in there. We just need to insert the correct data connection adapter name, which in this case is ‘FilterImages’.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure42.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;4. Click &lt;b&gt;OK&lt;/b&gt; three times to get back to the ‘Rules’ dialog box.&lt;/p&gt;

&lt;p&gt;5. Do the same actions for the third rule (&lt;i&gt;Date Taken specified&lt;/i&gt;); change the data connection adapter name to ‘FilterImages’.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure43.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;Notice that we’re using ‘Date_x0020_Taken’ in the&lt;b&gt; /filter&lt;/b&gt; parameter instead of ‘Date Taken’. This is because, in InfoPath, if our SharePoint List columns have spaces in their names, they are encoded with &amp;#39;x0020&amp;#39; when retrieved from the data source.&lt;/p&gt;

&lt;p&gt;Also note that the values in this parameter are &lt;span style="text-decoration:underline;"&gt;case-sensitive&lt;/span&gt;. If you accidentally give this command an invalid value for the &lt;b&gt;/filter&lt;/b&gt; parameter, no error is returned. It is up to the form designer to ensure that the &lt;b&gt;/filter&lt;/b&gt; parameter is correct.&lt;/p&gt;

&lt;p&gt;To make sure that we are using the correct values in our &lt;b&gt;/filter&lt;/b&gt; parameter, check for the exact node names in your data source (without the &lt;b&gt;&lt;i&gt;:ows_&lt;/i&gt;&lt;/b&gt; prefix):&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure44.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;For the same purpose that we need to point the sections and the fields to the newly-added ‘FilterImages’ secondary data source, we also need to change the rules and the conditional formatting in our controls that have any instances of the ‘qtpFormLogic’ &lt;i&gt;Images&lt;/i&gt; node to point to the ‘FilterImages’ &lt;i&gt;rs:data&lt;/i&gt; node instead. We will do this by looking for logic that uses any of the following nodes:&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure45.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;and replacing them accordingly with these:&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure46.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;6. &lt;b&gt;View&lt;/b&gt; button:&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;a. Double-click on the button to display its properties.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;b. In the ‘Button Properties’ window, click ‘Rules’ and modify the action in that rule. You will see that it sets the value of &lt;b&gt;ImageDocId&lt;/b&gt; to &lt;b&gt;ID&lt;/b&gt; that comes from the ‘qtpFormLogic’ secondary data source.&lt;/p&gt;

&lt;p style="padding-left:60px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure47.png" alt="" /&gt;&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;c. Change &lt;b&gt;ID&lt;/b&gt; into &lt;b&gt;:ows_ID&lt;/b&gt; of the ‘FilterImages’ secondary data source.&lt;/p&gt;

&lt;p style="padding-left:60px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure48.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;You should now have this action in your ‘View’ button rule:&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure49.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;7. &lt;b&gt;FilterImages&lt;/b&gt; sections:&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure36.png" alt="" width="366" height="256" /&gt;&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;Go to each section’s properties and click ‘Conditional Formatting’ in the ‘Display tab’.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;a. &lt;b&gt;data (FilterImages)&lt;/b&gt; section (Both conditions hide the control):&lt;/p&gt;

&lt;p style="padding-left:60px;"&gt;From:&lt;/p&gt;

&lt;p style="padding-left:90px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure50.png" alt="" width="441" height="240" /&gt;&lt;/p&gt;

&lt;p style="padding-left:60px;"&gt;To:&lt;/p&gt;

&lt;p style="padding-left:90px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure51.png" alt="" /&gt;&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;b.&lt;b&gt; row (FilterImages)&lt;/b&gt; repeating section:&lt;/p&gt;

&lt;p style="padding-left:60px;"&gt;From:&lt;/p&gt;

&lt;p style="padding-left:90px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure52.png" alt="" /&gt;&lt;/p&gt;

&lt;p style="padding-left:60px;"&gt;To:&lt;/p&gt;

&lt;p style="padding-left:90px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure53.png" alt="" /&gt;&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;c. &lt;b&gt;row (FilterImages)&lt;/b&gt; section:&lt;/p&gt;

&lt;p style="padding-left:60px;"&gt;From:&lt;/p&gt;

&lt;p style="padding-left:90px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure54.png" alt="" /&gt;&lt;/p&gt;

&lt;p style="padding-left:60px;"&gt;To:&lt;/p&gt;

&lt;p style="padding-left:90px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure55.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;8. &lt;b&gt;Use Selected Image&lt;/b&gt; button:&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;a. Modify only the first rule (&lt;i&gt;Copy Image URL&lt;/i&gt;) in the button properties:&lt;/p&gt;

&lt;p style="padding-left:60px;"&gt;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure56.png" alt="" /&gt;&lt;/p&gt;

&lt;p style="padding-left:60px;"&gt;Click &lt;b&gt;OK&lt;/b&gt; four times to go back to the ‘Insert Formula’ dialog. Your value for the &lt;b&gt;@qRulesLink&lt;/b&gt; should look similar to this:&lt;/p&gt;

&lt;p style="padding-left:90px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure57.png" alt="" /&gt;&lt;/p&gt;

&lt;p style="padding-left:60px;"&gt;Where the XPath formula for the value is: &lt;b&gt;xdXDocument:GetDOM(&amp;quot;FilterImages&amp;quot;)/xml/rs:data/z:row/@ows_Image[../@ows_ID = xdXDocument:GetDOM(&amp;quot;qtpFormLogic&amp;quot;)/FormLogic/View/ImageDocId]&lt;/b&gt;&lt;/p&gt;

&lt;p style="padding-left:60px;"&gt;This formula allows us to retrieve the value of the &lt;b&gt;Image &lt;/b&gt;column in our &lt;span style="text-decoration:underline;"&gt;SharePoint list&lt;/span&gt;, filtered such that its &lt;b&gt;ID&lt;/b&gt; column’s value is equal to the value in the &lt;b&gt;ImageDocID &lt;/b&gt;field of the qtpFormLogic secondary data source.&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;b. Back in the ‘Button Properties’ Display tab, click on the ‘Conditional Formatting’ button and change the condition from:&lt;/p&gt;

&lt;p style="padding-left:90px;"&gt;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure71.png" alt="" width="543" height="151" /&gt;&lt;/p&gt;

&lt;p style="padding-left:60px;"&gt;To:&lt;/p&gt;

&lt;p style="padding-left:90px;"&gt;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure72.png" alt="" /&gt;&lt;/p&gt;

&lt;p style="padding-left:30px;"&gt;c. Click &lt;span style="font-weight:bold;"&gt;OK &lt;/span&gt;to close all dialogs.&lt;/p&gt;

&lt;div style="overflow:hidden;position:absolute;width:1px;height:1px;top:0px;left:-10000px;" id="_mcePaste"&gt;&amp;lt;!--[endif]--&amp;gt;&amp;lt;!--[if gte mso 10]&amp;gt;  
&lt;p class="MsoListParagraphCxSpFirst" style="text-indent:-0.25in;"&gt;&lt;span&gt;&lt;span&gt;1.&lt;span style="font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span&gt;Use Selected Image &lt;/span&gt;&lt;/b&gt;&lt;span&gt;button:&lt;/span&gt;&lt;/p&gt;







&lt;p class="MsoListParagraphCxSpMiddle" style="margin-left:0.75in;text-indent:-0.25in;"&gt;&lt;span&gt;&lt;span&gt;a.&lt;span style="font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;Modify only the first rule (&lt;i&gt;Copy Image URL&lt;/i&gt;) in the button properties:&lt;/span&gt;&lt;/p&gt;







&lt;p class="MsoListParagraphCxSpLast" style="text-indent:0.25in;"&gt;&lt;span&gt;From:&lt;/span&gt;&lt;/p&gt;







&lt;p class="MsoNormal" style="text-align:center;"&gt;&lt;span&gt; &lt;/span&gt;&lt;/p&gt;







&lt;p class="MsoNormal" style="text-indent:0.75in;"&gt;&lt;span&gt;To:&lt;/span&gt;&lt;/p&gt;







&lt;p class="MsoNormal" style="text-align:center;"&gt;&lt;span&gt; &lt;/span&gt;&lt;/p&gt;







&lt;p class="MsoNormal" style="margin-left:0.75in;"&gt;&lt;span&gt;Where the XPath formula for the value is: &lt;b&gt;xdXDocument:GetDOM(&amp;quot;FilterImages&amp;quot;)/xml/rs:data/z:row/@ows_Image[../@ows_ID = xdXDocument:GetDOM(&amp;quot;qtpFormLogic_ImagePicker&amp;quot;)/FormLogic/View/ImageDocId]&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;







&lt;p class="MsoNormal" style="margin-left:0.75in;"&gt;&lt;span&gt;This formula allows us to retrieve the value of the &lt;b&gt;Image&lt;/b&gt; column in our &lt;span style="text-decoration:underline;"&gt;SharePoint list&lt;/span&gt;, filtered such that its &lt;b&gt;ID&lt;/b&gt; column’s value is equal to the value in the &lt;b&gt;ImageDocID&lt;/b&gt;.&lt;/span&gt;&lt;/p&gt;







&lt;p class="MsoListParagraph" style="margin-left:0.75in;text-indent:-0.25in;"&gt;&lt;span&gt;&lt;span&gt;b.&lt;span style="font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;Back in the ‘Button Properties’ Display tab, click on the ‘Conditional Formatting’ button and change the condition from:&lt;/span&gt;&lt;/p&gt;







&lt;p class="MsoNormal" style="text-align:center;"&gt;&lt;span&gt; &lt;/span&gt;&lt;/p&gt;







&lt;p class="MsoNormal" style="margin-left:0.75in;"&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;To:&lt;/span&gt;&lt;/p&gt;







&lt;p class="MsoNormal" style="text-align:center;"&gt;&lt;span&gt; &lt;/span&gt;&lt;/p&gt;







&lt;p class="MsoListParagraph" style="margin-left:0.75in;text-indent:-0.25in;"&gt;&lt;span&gt;&lt;span&gt;c.&lt;span style="font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;Click OK to close all dialogs.&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;9. The error expression “&lt;b&gt;Nothing found. Please try a different search criteria.&lt;/b&gt;”; change the first conditional formatting from:&lt;/p&gt;








&lt;p style="padding-left:60px;"&gt;&amp;nbsp; &lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure59.png" alt="" /&gt;&lt;/p&gt;


&lt;p style="padding-left:30px;"&gt;to:&lt;/p&gt;


&lt;p style="padding-left:60px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure60.png" alt="" /&gt;&lt;/p&gt;&lt;blockquote&gt;We should now have the following conditional formatting in our error expression box (each hides the control):&lt;/blockquote&gt;


&lt;p style="padding-left:60px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure62.png" alt="" /&gt;&lt;/p&gt;


&lt;p&gt;Lastly, we should also modify the ‘Use this Image’ button which allows us to upload our own images from our network or local machine. This is where we use the &lt;b&gt;SaveToSharePoint&lt;/b&gt; qRules command which saves a file, a set of files, an image or a set of images to a SharePoint Document Library or List.&lt;/p&gt;


&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure63.png" alt="" /&gt;&lt;/p&gt;


&lt;p&gt;10. Double-click on it to open its properties, and then click ‘Rules’.&lt;/p&gt;


&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure64.png" alt="" /&gt;&lt;/p&gt;


&lt;p&gt;11. You’ll see three rules in this button. We need to modify the action in the first rule only since it calls the ‘SaveToSharePoint’ qRules command. In the ‘Action’ dialog box, you’ll see that the &lt;b&gt;Command&lt;/b&gt; field is being set to the value: &lt;b&gt;SaveToSharePoint /url=&amp;lt;SharePoint List URL&amp;gt; /xpath=/my:QdImagePicker/my:Image&lt;/b&gt;&lt;/p&gt;


&lt;p style="padding-left:60px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure65.png" alt="" width="344" height="245" /&gt;&lt;/p&gt;


&lt;p style="padding-left:30px;"&gt;a. For the &lt;b&gt;/url&lt;/b&gt; parameter, replace &amp;lt;SharePoint List URL&amp;gt; with the list URL that we’ve set up earlier in this tutorial, e.g. http://&amp;lt;SharePointSite&amp;gt;/Lists/ImagePickerList, making sure to replace &lt;i&gt;&lt;b&gt;&amp;lt;SharePointSite&amp;gt;&lt;/b&gt;&lt;/i&gt; with yours.&lt;/p&gt;


&lt;p style="padding-left:30px;"&gt;b. For the &lt;b&gt;/xpath&lt;/b&gt; parameter, replace &lt;b&gt;/my:QdImagePicker/my:Image&lt;/b&gt; with the correct XPath for your &lt;b&gt;Image&lt;/b&gt; node; in this case, we have: &lt;b&gt;/my:myFields/my:QdImagePicker/my:Image&lt;/b&gt;&lt;/p&gt;


&lt;p style="padding-left:60px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure66.png" alt="" /&gt;&lt;br /&gt;&lt;/p&gt;


&lt;p style="padding-left:30px;"&gt;Your command syntax should then be:&lt;/p&gt;


&lt;p style="padding-left:30px;"&gt;&lt;b&gt;SaveToSharePoint /url=http://&amp;lt;SharePoinSite&amp;gt;/Lists/ImagePickerList xpath=/my:myFields/my:QdImagePicker/my:Image&lt;/b&gt;&lt;/p&gt;


&lt;p style="padding-left:30px;"&gt;(Again, making sure to replace &lt;b&gt;&lt;i&gt;&amp;lt;SharePointSite&amp;gt;&lt;/i&gt;&lt;/b&gt; with yours).&lt;/p&gt;


&lt;p&gt;To make our scenario more realistic, let’s add a few fields and make our form template a bit fancy. Here’s what I have in Preview mode:&lt;/p&gt;


&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure67.png" alt="" /&gt;&lt;/p&gt;


&lt;p&gt;That’s it! Our form template is all set up and is ready to be published to our SharePoint Site.&lt;/p&gt;


&lt;p&gt;&lt;b&gt;PUBLISH TO A SHAREPOINT SITE&lt;/b&gt;&lt;/p&gt;


&lt;p&gt;1. Save all the changes you’ve made in your &lt;i&gt;ImagePickerXSN&lt;/i&gt; form template.&lt;/p&gt;


&lt;p&gt;2. In InfoPath’s menu, select &lt;b&gt;File &amp;gt; Publish&lt;/b&gt;.&lt;/p&gt;


&lt;p&gt;3. In the ‘Publishing Wizard’, select:&lt;/p&gt;


&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure68.png" alt="" /&gt;&lt;/p&gt;


&lt;p&gt;4. Enter the location of your SharePoint site in the next screen.&lt;/p&gt;


&lt;p&gt;5. We will publish this form template in a ‘Document Library’, so select that option and click &lt;b&gt;Next&lt;/b&gt;.&lt;/p&gt;


&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure69.png" alt="" /&gt;&lt;/p&gt;


&lt;p&gt;6. You can create a new document library with a name of your choosing and promote/display columns as you wish.&lt;/p&gt;


&lt;p&gt;7. When done, click &lt;b&gt;Publish&lt;/b&gt;, and then &lt;b&gt;Close&lt;/b&gt; to exit out of the wizard.&lt;/p&gt;


&lt;p&gt;You can also add a submit data connection as you normally would if you wish to submit your forms to your SharePoint site. We’ll skip those steps for now since the ImagePicker XTP will function simply by just opening a new form where we published our form template to.&lt;/p&gt;


&lt;p&gt;Open your SharePoint document library and create a new document/form. Fill out your fields, click on that ‘Pick Image’ button and start searching for images! Don’t miss out on the ‘Add’ tab and select any image from your network and local machine!&lt;/p&gt;


&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/imagepickerxtp/Figure70.png" alt="" /&gt;&lt;/p&gt;


&lt;p&gt;Once you’ve started using Qdabra’s ImagePicker template part in your InfoPath solutions, you’ll see how easy and neat it is to search and add images in just a few clicks.&lt;/p&gt;


&lt;ul&gt;
&lt;li&gt;Download the QdImagePicker XTP for &lt;b&gt;FREE&lt;/b&gt; &lt;a href="http://www.qdabra.com/en/products/qdimagepicker.aspx"&gt;here&lt;/a&gt;.&lt;/li&gt;


&lt;li&gt;Download Qdabra qRules v2.0 for a &lt;b&gt;FREE&lt;/b&gt; trial &lt;a href="http://www.qdabra.com/en/products/download/qRulesTrial.aspx"&gt;here&lt;/a&gt;.&lt;/li&gt;

&lt;/ul&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=50486" width="1" height="1"&gt;</description><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/template+part/default.aspx">template part</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/XTP/default.aspx">XTP</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/sharepoint+list/default.aspx">sharepoint list</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/image+picker/default.aspx">image picker</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/ImagePicker/default.aspx">ImagePicker</category></item><item><title>Adventures in Troubleshooting</title><link>http://www.infopathdev.com/blogs/hilary/archive/2010/01/02/adventuresintroubleshooting.aspx</link><pubDate>Sat, 02 Jan 2010 13:37:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50268</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;This is going to be short and sweet. The other day I ran into an issue that made me aware of a little ... inconsistency .... in Visual Studio that I&amp;#39;d like to make sure everyone else is aware of to.&lt;/p&gt;
&lt;p&gt;I have a table that looks like this:&lt;br /&gt;&lt;img style="WIDTH:287px;HEIGHT:86px;" title="Table" alt="Table" src="http://www.infopathdev.com/blogs/hilary/Adventures%20In%20Troubleshooting/Adventures1.png" width="287" height="86" /&gt;&lt;/p&gt;
&lt;p&gt;I&amp;nbsp;have a form template with a data connection to that table.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have a bit of code that looks like this:&lt;br /&gt;&lt;img style="WIDTH:802px;HEIGHT:135px;" title="Code snippet" alt="Code snippet" src="http://www.infopathdev.com/blogs/hilary/Adventures%20In%20Troubleshooting/Adventures2.png" width="802" height="135" /&gt;&lt;/p&gt;
&lt;p&gt;What you can&amp;#39;t see is that I have a trailing space in my Orders table for PO Number &lt;strong&gt;def-456&lt;/strong&gt;. And if you look in the XML visualizer for the data source, you won&amp;#39;t see it there, either....&lt;br /&gt;&lt;img style="WIDTH:447px;HEIGHT:459px;" title="Xml Visualizer" alt="Xml Visualizer" src="http://www.infopathdev.com/blogs/hilary/Adventures%20In%20Troubleshooting/Adventures3.png" width="447" height="459" /&gt;&lt;/p&gt;
&lt;p&gt;Opening the Text visualizer for the OuterXml for the &lt;strong&gt;nav&lt;/strong&gt; variable tells a different story:&lt;br /&gt;&lt;img style="WIDTH:546px;HEIGHT:224px;" title="Text visualizer" alt="Text visualizer" src="http://www.infopathdev.com/blogs/hilary/Adventures%20In%20Troubleshooting/Adventures4.png" width="546" height="224" /&gt;&lt;/p&gt;
&lt;p&gt;So, if you are troubleshooting some code, trying to figure out why you aren&amp;#39;t getting back a node that you are just &lt;strong&gt;sure&lt;/strong&gt; should be in your data source... take a minute to look at both visualizers. It may save you some time and at least a bit of your sanity.&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=50268" width="1" height="1"&gt;</description></item><item><title>Qdabra's Header-Footer Template Part</title><link>http://www.infopathdev.com/blogs/mel_balsamo/archive/2009/12/23/qdabra-s-header-footer-template-part.aspx</link><pubDate>Wed, 23 Dec 2009 10:32:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50140</guid><dc:creator>Mel Balsamo</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;When creating InfoPath solutions, one of the most important aspects is the visual design. This includes making sure that the layout, fonts, colors, white spaces, and most especially, the branding, are all uniform. We can always decide how our forms look like, but for a company to have its unique identity in its InfoPath forms, it should maintain proper branding by using its own company logo.&lt;/p&gt;
&lt;p&gt;Company logos can either be placed in the InfoPath form’s header or footer, or both. Qdabra created a template part that has header and footer sections built-in. We can just change the logo, form title, company details, etc. and start using them in our forms.&lt;/p&gt;
&lt;p&gt;Here’s how the &lt;strong&gt;Header-Footer XTP&lt;/strong&gt; looks:&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/headerfooterxtp/Figure01.png" width="657" height="267" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This blog post details the steps needed to modify the Header-Footer XTP and begin using it in your InfoPath forms.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;REQUIREMENTS&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Header-Footer XTP&lt;/strong&gt; – Download it &lt;strong&gt;FREE&lt;/strong&gt; &lt;a href="http://www.infopathdev.com/files/folders/templateparts/entry50139.aspx" target="_blank"&gt;here&lt;/a&gt; and save it your local machine.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;InfoPath 2007&lt;/strong&gt; – template parts (XTPs) are not supported in InfoPath 2003.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;MODIFY THE TEMPLATE PART&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;1. Launch InfoPath.&lt;/p&gt;
&lt;p&gt;2. In the &lt;em&gt;Getting Started&lt;/em&gt; dialog, under the ‘Design a form section’, click &lt;strong&gt;Design a Form Template…&lt;/strong&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/headerfooterxtp/Figure02.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;3. In the ‘Open a form template’ section, click &lt;strong&gt;On My Computer…&lt;/strong&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/headerfooterxtp/Figure03.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;4. In the ‘Open in Design Mode’ dialog box, select &lt;strong&gt;InfoPath Template Parts (*.xtp)&lt;/strong&gt; from the file types dropdown.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/headerfooterxtp/Figure04.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;5. Browse to the location where you saved the Header-Footer XTP and open it.&lt;/p&gt;
&lt;p&gt;6. The template part will open in InfoPath Design mode.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/headerfooterxtp/Figure05.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;7. Make all the necessary changes:&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;a. Header: replace the company logo with your own.&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;b. Footer: replace the small logo/icon as well as the company details.&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;&lt;em&gt;Note: The &lt;strong&gt;Document ID&lt;/strong&gt; in the footer is applicable only if you have &lt;/em&gt;&lt;a href="http://www.qdabra.com/en/products/dbxl.aspx" target="_blank"&gt;&lt;em&gt;Qdabra DBXL&lt;/em&gt;&lt;/a&gt;&lt;em&gt; installed. You can delete this whole row if you do not intend to use the form with DBXL.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;8. Save and close the template part.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ADD THE TEMPLATE PART IN INFOPATH CUSTOM CONTROLS&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;1. Launch InfoPath and select &lt;strong&gt;Design a Form Template&lt;/strong&gt; based on a new blank one.&lt;/p&gt;
&lt;p&gt;2. In the &lt;em&gt;Controls&lt;/em&gt; taskpane, click &lt;strong&gt;Add or Remove Custom Controls…&lt;/strong&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/headerfooterxtp/Figure06.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;3. In the&lt;em&gt; Custom Controls&lt;/em&gt; dialog box, click &lt;strong&gt;Add &amp;gt; Template Part&lt;/strong&gt;, and browse to the location where you saved your HeaderFooter XTP.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/headerfooterxtp/Figure07.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;4. Verify that the XTP has been added to your &lt;em&gt;Custom Controls&lt;/em&gt; taskpane.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/headerfooterxtp/Figure08.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ADD THE TEMPLATE PART TO YOUR INFOPATH FORM&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;1. In your blank InfoPath form template, click or drag the the HeaderFooter XTP from the &lt;em&gt;Custom Controls&lt;/em&gt; taskpane. This will add the XTP onto your view.&lt;/p&gt;
&lt;p&gt;2. Highlight or select the entire contents of the HeaderFooter XTP section.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/headerfooterxtp/Figure09.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;3. Drag the selection outside the section.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/headerfooterxtp/Figure10.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;4. Delete the empty &lt;em&gt;HeaderFooterXTP&lt;/em&gt; section, leaving only the its dragged contents in the view.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/headerfooterxtp/Figure11.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;5. Delete the &lt;em&gt;HeaderFooterXTP&lt;/em&gt; node from the main data source.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/headerfooterxtp/Figure12.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;6. Modify the two expression boxes in for the &lt;em&gt;Document ID&lt;/em&gt; found in the footer.&lt;/p&gt;
&lt;p&gt;Note: You may skip these steps and proceed to Step 7 if you do not intend to use the form with &lt;a href="http://www.qdabra.com/en/products/dbxl.aspx" target="_blank"&gt;Qdabra DBXL&lt;/a&gt;.&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;a. Change the conditional formatting for the expression box labeled &lt;strong&gt;New&lt;/strong&gt;.&lt;/p&gt;
&lt;p style="PADDING-LEFT:60px;"&gt;i. Right-click on the expression box and select &lt;strong&gt;Conditional Formatting&lt;/strong&gt;…&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;PADDING-LEFT:60px;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/headerfooterxtp/Figure13.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="PADDING-LEFT:60px;"&gt;ii. In the ‘Conditional Formatting’ window, click &lt;strong&gt;Modify&lt;/strong&gt;.&lt;/p&gt;
&lt;p style="PADDING-LEFT:60px;"&gt;iii. Delete &lt;em&gt;my:HeaderFooterXTP&lt;/em&gt; in the formula.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;PADDING-LEFT:60px;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/headerfooterxtp/Figure14.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="PADDING-LEFT:60px;"&gt;iv. Click OK twice to close the dialogs.&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;b. Change the formula for the &lt;strong&gt;Document ID&lt;/strong&gt; expression box.&lt;/p&gt;
&lt;p style="PADDING-LEFT:60px;"&gt;i. Right-click on the expression box and select &lt;strong&gt;Expression Box Properties…&lt;/strong&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;PADDING-LEFT:60px;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/headerfooterxtp/Figure15.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="PADDING-LEFT:60px;"&gt;i. In the ‘Expression Box Properties’ window, under the ‘General’ tab, click on the &lt;strong&gt;&lt;em&gt;fx&lt;/em&gt;&lt;/strong&gt; button.&lt;/p&gt;
&lt;p style="PADDING-LEFT:60px;"&gt;ii. Check ‘Edit XPath’ in the Formula dialog and delete &lt;em&gt;my:HeaderFooterXTP&lt;/em&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;PADDING-LEFT:60px;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/headerfooterxtp/Figure16.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="PADDING-LEFT:60px;"&gt;iii. Click OK twice to close the dialog boxes.&lt;/p&gt;
&lt;p style="PADDING-LEFT:60px;"&gt;iv. Repeat all the steps in 6a above but this time, changing the conditional formatting for the &lt;strong&gt;blank Document ID&lt;/strong&gt; expression box.&lt;/p&gt;
&lt;p&gt;7. Change the formula for the &lt;strong&gt;Form Version&lt;/strong&gt; expression box in the footer.&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;a. Right-click on the expression box and select &lt;strong&gt;Expression Box Properties…&lt;/strong&gt;&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;b. In the ‘Expression Box Properties’ window, under the ‘General’ tab, click on the &lt;strong&gt;&lt;em&gt;fx&lt;/em&gt;&lt;/strong&gt; button.&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;c. Check ‘Edit XPath’ in the Formula dialog and delete &lt;em&gt;my:HeaderFooterXTP&lt;/em&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;PADDING-LEFT:30px;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/headerfooterxtp/Figure17.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;d. Click &lt;strong&gt;OK&lt;/strong&gt; twice to close the dialog boxes.&lt;/p&gt;
&lt;p&gt;That’s it! You can now design your form to suit your company needs. By having all your forms designed this way, ensure that you are maintaining uniformity and proper branding in your InfoPath solutions.&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=50140" width="1" height="1"&gt;</description><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/template+part/default.aspx">template part</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/XTP/default.aspx">XTP</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/footer/default.aspx">footer</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/header/default.aspx">header</category></item><item><title>Qdabra's Zero-ActiveX Contact Selector XTP</title><link>http://www.infopathdev.com/blogs/mel_balsamo/archive/2009/12/14/qdabra-s-zero-activex-contact-selector-xtp.aspx</link><pubDate>Mon, 14 Dec 2009 14:27:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:49903</guid><dc:creator>Mel Balsamo</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;b&gt;PROBLEM&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;You want to use the InfoPath Contact Selector to add multiple contacts to your form, but:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Selecting multiple users with Contact Selector requires code&lt;/li&gt;
&lt;li&gt;Contact Selector is an ActiveX control and requires installation on client machines&lt;/li&gt;
&lt;li&gt;Contact Selector doesn’t work for browser-based forms when the user is not using Internet Explorer&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;b&gt;SOLUTION&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Install Qdabra’s Zero-ActiveX Contact Selector&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Based on Qdabra’s qRules library – extend your InfoPath forms without writing code&lt;/li&gt;
&lt;li&gt;Easy-to-add XML Template Part – just add custom control via the InfoPath 2007 Designer&lt;/li&gt;
&lt;li&gt;Comes with pre-configured layout which saves you time – just drag and drop from the taskpane&lt;/li&gt;
&lt;li&gt;No ActiveX – works with browser based forms&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;b&gt;QUICK PREVIEW&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Let’s take a quick look: here is a screenshot of &lt;b&gt;Qdabra’s Zero-ActiveX Contact Selector XTP&lt;/b&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure01.png" width="634" height="221" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the screenshot, the user searched for all users with “admin” in their Active Directory records and then clicked on the arrows to add Jim Cantwell and Patrick Halstead to the form.&lt;/p&gt;
&lt;p&gt;Click &lt;a href="http://www.infopathdev.com/files/folders/video_demos/entry50984.aspx"&gt;here&lt;/a&gt; to watch a&amp;nbsp;short video demo that shows how the template part works in InfoPath and in the browser.&lt;/p&gt;
&lt;p&gt;This blog post details the steps needed before you begin using the XTP in your InfoPath forms; just a few modifications and tweaks and you’re ready to go!&lt;/p&gt;
&lt;p&gt;&lt;b&gt;REQUIREMENTS&lt;/b&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;QdContactSelectorXTP&lt;/b&gt; – Contact Selector template part, no ActiveX required, no code. Download it &lt;b&gt;FREE&lt;/b&gt; &lt;a href="http://www.qdabra.com/en/products/qdcontactselector.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;InfoPath 2007&lt;/b&gt; – template parts (XTPs) are not supported in InfoPath 2003.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Qdabra Database Accelerator&lt;/b&gt; – includes the Active Directory Web Service. Download a &lt;b&gt;FREE&lt;/b&gt; trial &lt;a title="Qdabra DBXL" href="http://www.qdabra.com/en/products/DBXL.aspx" target="_blank"&gt;here&lt;/a&gt;. Alternatively, you may purchase Qdabra’s Active Directory Standalone tool &lt;a title="Qdabra ADWS" href="http://www.qdabra.com/proddetail.asp?prod=QADWS" target="_blank"&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Qdabra qRules v2.0&lt;/b&gt; – add the most commonly requested InfoPath features without the need of writing code. Download a &lt;b&gt;FREE&lt;/b&gt; trial &lt;a title="Qdabra qRules" href="http://www.qdabra.com/en/products/download/qRulesTrial.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Admin-deploy to SharePoint&amp;nbsp;–&lt;/b&gt;&amp;nbsp;qRules is a library that contains code, so when you publish your form to SharePoint you need to publish it as an administrator approved form. This requirement goes away for SharePoint 2010.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;b&gt;ADD THE TEMPLATE PART IN INFOPATH CUSTOM CONTROLS&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;1. Launch InfoPath and select &lt;b&gt;Design a Form Template&lt;/b&gt; based on a new blank one.&lt;/p&gt;
&lt;p&gt;2. In the &lt;b&gt;Controls&lt;/b&gt; taskpane, click &lt;b&gt;Add or Remove Custom Controls…&lt;/b&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure02.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;3. In the Custom Controls dialog box, click &lt;b&gt;Add &amp;gt; Template Part&lt;/b&gt;, and browse to the location where you placed your &lt;i&gt;QdContactSelector XTP&lt;/i&gt;.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure03.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;4. Verify that the XTP has been added to your Custom Controls taskpane.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure04.png" width="200" height="362" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;5. Save your form template (XSN). For the purposes of this blog post, we will name it as &lt;i&gt;ContactSelectorXSN&lt;/i&gt;.&lt;/p&gt;
&lt;p&gt;6. Close InfoPath.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;INJECT QRULES AND THE XTP&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;1. Launch the &lt;b&gt;qRules Injector&lt;/b&gt; from &lt;i&gt;Start &amp;gt; All Programs &amp;gt; Qdabra &amp;gt; Tools &amp;gt; qRules Injector&lt;/i&gt;.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure05.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2. Browse to the location where you saved your &lt;i&gt;ContactSelectorXSN&lt;/i&gt;.&lt;/p&gt;
&lt;p&gt;3. Click &lt;b&gt;Inject&lt;/b&gt;, then &lt;b&gt;OK&lt;/b&gt; in the confirmation dialog, and then close the &lt;i&gt;qRules Injector&lt;/i&gt;.&lt;/p&gt;
&lt;p&gt;4. Open &lt;i&gt;ContactSelectorXSN&lt;/i&gt; in InfoPath Design mode.&lt;/p&gt;
&lt;p&gt;5. Scroll down to the very bottom of the &lt;b&gt;Controls&lt;/b&gt; taskpane to get to the &lt;b&gt;Custom&lt;/b&gt; section, and then click on the &lt;i&gt;QdContactSelector&lt;/i&gt; control.&lt;/p&gt;
&lt;p&gt;You should now have the template part on your canvas. The main and the secondary data sources will be injected in your XSN as well.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure06.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;SOURCE FILES CLEAN-UP&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;If you go to &lt;b&gt;Tools &amp;gt; Data Connections&lt;/b&gt;, you will notice that you have two instances of &lt;i&gt;QdabraRules&lt;/i&gt;, one for the XSN, and one for the XTP:&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure07.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When you first injected qRules in your XSN, it added the &lt;i&gt;QdabraRules&lt;/i&gt; XML as a secondary data source. In this same XSN, you injected the &lt;i&gt;QdContactSelector&lt;/i&gt; XTP which also uses qRules. This added another &lt;i&gt;QdabraRules&lt;/i&gt; XML secondary data source to the XSN (with a different name). So now, you have two qRules XMLs, which is confusing and might cause issues when calling the qRules commands, hence the need to do some clean-up.&lt;/p&gt;
&lt;p&gt;1. Save &lt;i&gt;ContactSelectorXSN&lt;/i&gt; as source files and close InfoPath.&lt;/p&gt;
&lt;p&gt;2. Modify the &lt;b&gt;manifest.xsf&lt;/b&gt; file:&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;a. In the directory where you saved your source files, locate &lt;b&gt;manifest.xsf&lt;/b&gt; and open it in any text editor.&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;b. Replace all seven instances of “&lt;i&gt;QdabraRules_QdContactSelector&lt;/i&gt;” with “&lt;i&gt;QdabraRules&lt;/i&gt;”.&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;c. Delete the associated blocks where you find “&lt;i&gt;QdabraRules1&lt;/i&gt;”:&lt;/p&gt;
&lt;p style="PADDING-LEFT:60px;"&gt;i. xsf:file (for .xsd)&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;PADDING-LEFT:60px;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure08.png" width="707" height="116" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="PADDING-LEFT:60px;"&gt;ii. xsf:file (for .xml)&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;PADDING-LEFT:60px;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure09.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="PADDING-LEFT:60px;"&gt;iii. xsf:dataObject&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;PADDING-LEFT:60px;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure10.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;d. Save and close &lt;b&gt;manifest.xsf&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;3. Modify the &lt;b&gt;sampledata.xml&lt;/b&gt; file&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;a. Open &lt;b&gt;sampledata.xml &lt;/b&gt;in a text editor.&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;b. Delete the &lt;i&gt;xd:DataConnection&lt;/i&gt; block where you find “&lt;i&gt;QdabraRules_QdContact&lt;/i&gt;Selector”.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;PADDING-LEFT:30px;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure11.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;c. Save and close &lt;b&gt;sampledata.xml&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;4. Delete the extraneous &lt;i&gt;QdabraRules1&lt;/i&gt; files in the source files directory:&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;a. QdabraRules1.xml&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;b. QdabraRules1.xsd&lt;/p&gt;
&lt;p&gt;5. Verify changes.&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;a. Open &lt;b&gt;manifest.xsf&lt;/b&gt; in InfoPath Design mode.&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;b. Go to &lt;b&gt;Tools &amp;gt; Data Connections&lt;/b&gt; and verify that you now have only one instance of &lt;i&gt;QdabraRules&lt;/i&gt;.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;PADDING-LEFT:30px;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure12.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;MODIFY THE ACTIVE DIRECTORY DATA CONNECTION&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;1. In &lt;b&gt;Tools &amp;gt; Data Connections&lt;/b&gt;, modify the &lt;i&gt;FindUsersByName_QdContactSelector&lt;/i&gt; data connection.&lt;/p&gt;
&lt;p&gt;2. Replace servername (in &lt;i&gt;http://servername/qdabrawebservice/ADUserInfo.asmx?WSDL&lt;/i&gt;) with the correct location where you installed DBXL.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure13.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note: If you are using &lt;a title="Qdabra ADWS" href="http://www.qdabra.com/en/products/ADWebService.aspx" target="_blank"&gt;Qdabra’s AD Standalone Tool&lt;/a&gt;, the AD Web Service URL should be in the format: &lt;i&gt;http://servername/QdabraAD/ADUserInfo.asmx?WSDL&lt;/i&gt;.&lt;/p&gt;
&lt;p&gt;3. Click &lt;b&gt;Next&lt;/b&gt; and make sure that the &lt;i&gt;FindUsersByName&lt;/i&gt; operation is selected. Click &lt;b&gt;Next&lt;/b&gt; again.&lt;/p&gt;
&lt;p&gt;4. Leave the &lt;i&gt;tns:name&lt;/i&gt; parameter blank, and for the &lt;i&gt;tns:searchType*&lt;/i&gt;, select &lt;b&gt;Contains&lt;/b&gt;.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure14.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;5. Click &lt;b&gt;Next&lt;/b&gt; twice more, then &lt;b&gt;Finish&lt;/b&gt; to exit out of the wizard.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;MODIFY THE QRULES COMMANDS&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Since you’ve added the &lt;i&gt;QdContactSelector &lt;/i&gt;XTP into an XSN, you need to make sure that the qRules commands point to the new fields’ XPaths.&lt;/p&gt;
&lt;p&gt;1. Double-click on the &lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure15.png" /&gt;&amp;nbsp;button to open its properties.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure16.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2. Click &lt;b&gt;Rules&lt;/b&gt; and modify all the three actions in the&lt;b&gt; &lt;/b&gt;&lt;i&gt;Insert User&lt;/i&gt; rule:&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure17.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;a. Change the first action that calls the &lt;b&gt;Insert&lt;/b&gt; command to:&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;&lt;b&gt;&lt;i&gt;Insert /parent=/my:myFields/my:UserList /child=/my:Alias /count=1&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;PADDING-LEFT:30px;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure18.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;b. Change the second action that calls the &lt;b&gt;SetValue&lt;/b&gt; command to:&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;&lt;b&gt;&lt;i&gt;concat(&amp;quot;SetValue /xpath=/my:myFields/my:UserList/my:Alias[last()] /value=&amp;quot;, &lt;span style="TEXT-DECORATION:underline;"&gt;@value&lt;/span&gt;)&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;PADDING-LEFT:30px;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure19.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;Note: &lt;b&gt;@value&lt;/b&gt; refers to a field in the form. If in doubt, tick the checkbox labeled &lt;i&gt;Edit XPath&lt;/i&gt; to see the full xpath of the &lt;b&gt;@value&lt;/b&gt; node.&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;c. Do the same for the third action for the &lt;b&gt;SetValue&lt;/b&gt; command:&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;&lt;b&gt;&lt;i&gt;concat(&amp;quot;SetValue /xpath=/my:myFields/my:UserList/my:Alias[last()]/@my:name /value=&amp;quot;, &lt;span style="TEXT-DECORATION:underline;"&gt;@display&lt;/span&gt;)&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;PADDING-LEFT:30px;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure20.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;3. Click &lt;b&gt;OK&lt;/b&gt; as many times needed to close all the dialog boxes.&lt;/p&gt;
&lt;p&gt;4. Double-click on the &lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure21.png" width="20" height="19" /&gt;&amp;nbsp;button to open its properties and modify the &lt;i&gt;Remove User&lt;/i&gt; rule.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure22.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the &lt;b&gt;Insert Formula&lt;/b&gt; dialog, check on the &lt;i&gt;Edit XPath (advanced)&lt;/i&gt; box and change the &lt;b&gt;Delete&lt;/b&gt; command to:&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;i&gt;concat(&amp;quot;Delete /xpath=/my:myFields/my:UserList/my:Alias[&amp;quot;, count(preceding-sibling::my:Alias) + 1, &amp;quot;]&amp;quot;)&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure23.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;5. Click &lt;b&gt;OK&lt;/b&gt; until all dialog boxes are closed.&lt;/p&gt;
&lt;p&gt;6. Add conditional formatting so that, when users have already selected a contact, they can no longer add the same contact.&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;a. Double-click on the &lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure15.png" width="20" height="20" /&gt;&amp;nbsp;button to open its properties.&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;b. Go to the &lt;b&gt;Display&lt;/b&gt; tab &lt;b&gt;&amp;gt; Conditional Formatting &amp;gt; Add&lt;/b&gt;.&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;c. Add a condition such that if &lt;b&gt;Alias&lt;/b&gt; (from the main data source):&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;PADDING-LEFT:30px;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure24.png" width="316" height="361" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;&lt;b&gt;is equal to&lt;/b&gt; the value node (from the &lt;i&gt;FindUsersByName_QdContactSelector&lt;/i&gt; secondary data source):&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;PADDING-LEFT:30px;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure25.png" width="316" height="361" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;then &lt;b&gt;hide the control&lt;/b&gt;:&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;PADDING-LEFT:30px;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure26.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;d. Click &lt;b&gt;OK&lt;/b&gt; until all the dialog boxes are closed.&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;e. Do the same for the &lt;b&gt;@display&lt;/b&gt; field. Double-click on the textbox to open its properties.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;PADDING-LEFT:30px;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure27.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;f. Go to the &lt;b&gt;Display&lt;/b&gt; tab &lt;b&gt;&amp;gt; Conditional Formatting &amp;gt; Add&lt;/b&gt;.&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;g. Add a condition such that if &lt;b&gt;Alias&lt;/b&gt; (from the main data source) &lt;b&gt;is equal to&lt;/b&gt; the value node (from the &lt;i&gt;FindUsersByName_QdContactSelector&lt;/i&gt; secondary data source), then &lt;b&gt;change the font color&lt;/b&gt; to something lighter:&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;PADDING-LEFT:30px;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/contactselectorxtp/Figure28.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;h. Click &lt;b&gt;OK&lt;/b&gt; until all the dialog boxes are closed.&lt;/p&gt;
&lt;p&gt;That’s it! You’re all set to use Qdabra’s Zero-ActiveX Contact Selector! Test your XSN in Preview mode and search for users, select contacts and even delete them. Finish designing your form template, save it, and you’re ready to go!&lt;/p&gt;
&lt;p&gt;&lt;b&gt;PUBLISH TO SHAREPOINT&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Here’s a &lt;a title="Admin-approved Form Templates" href="http://www.infopathdev.com/blogs/janice/archive/2009/03/03/administrator-approved-form-templates.aspx" target="_blank"&gt;link&lt;/a&gt; to an article describing how to publish your new form to SharePoint so you can use it in the browser.&lt;/p&gt;
&lt;p&gt;You can also refer to the User Guide that comes with your qRules v2.0 installation for instructions on how to use your qRules solutions in InfoPath Forms Services.&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=49903" width="1" height="1"&gt;</description><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/template+part/default.aspx">template part</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/XTP/default.aspx">XTP</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/contact+selector/default.aspx">contact selector</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/activeX/default.aspx">activeX</category></item><item><title>Copy SharePoint List Data to Main Data Source</title><link>http://www.infopathdev.com/blogs/mel_balsamo/archive/2009/12/04/copy-sharepoint-list-data-to-main-data-source.aspx</link><pubDate>Thu, 03 Dec 2009 17:32:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:49682</guid><dc:creator>Mel Balsamo</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;strong&gt;&lt;em&gt;This post was originally written by &lt;/em&gt;&lt;/strong&gt;&lt;a href="http://claytoncobb.wordpress.com/" target="_blank"&gt;&lt;strong&gt;&lt;em&gt;Clay Cobb&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;&lt;em&gt;&amp;nbsp;and is republished here with permission. To see the original article, please click &lt;u&gt;&lt;font color="#0000ff"&gt;&lt;a href="http://claytoncobb.wordpress.com/2009/08/03/infopath-copy-sharepoint-list-data-to-main-data-source/"&gt;here&lt;/a&gt;&lt;/font&gt;&lt;/u&gt;.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;One thing that you can&amp;#39;t easily do in InfoPath is to copy repeating data from a secondary data source - like a SharePoint list - to the main data source. This is an important necessity, because the data from secondary data connections does not get saved in the resulting XML data file of a submitted/saved InfoPath form. So, when you look at the form initially, you see the nice pretty data from your SharePoint list enumerated within the repeating table you placed on the canvas, but if you were to open the raw XML file, none of that data would be there. This is because an InfoPath form only keeps whatever data is saved to its main data source. A data connection to a SharePoint list is just a secondary data connection, which in essence becomes a window into the data as it currently exists. Yes, you can re-open your XML file in InfoPath and see the data from your SharePoint list, but it&amp;#39;s the current instance of that data, not the data that existed at the time you previously submitted the form. Sometimes, this is ok, but what if you needed to get that SharePoint data into your form and keep it there? To do this, you must copy the data into the main data source. How can you do that? Well, you can custom code something, or you can use the great set of special commands known as &lt;a title="qRules" href="http://www.qdabra.com/en/products/qRules.aspx" target="_blank"&gt;&lt;strong&gt;qRules&lt;/strong&gt;&lt;/a&gt; that is provided to all of us by &lt;a title="Qdabra Software" href="http://www.qdabra.com/" target="_blank"&gt;Qdabra&lt;/a&gt;. qRules allows you to do many things, but the one command we will focus on is named &lt;em&gt;CopyTable&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;font color="#ff0000"&gt;Caveats:&lt;/font&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;font color="#ff0000"&gt;qRules introduces code to your form, so if your forms are browser-enabled, then they will require Full Trust and Administrative-Approval publishing type. I have not tested any in browser forms yet&lt;/font&gt;&lt;/li&gt;
&lt;li&gt;&lt;font color="#ff0000"&gt;The CopyTable command will only work if the nodes match, which also means each node has to have data in it (no blank fields). The reason your fields can’t be blank is because when there is a blank field, no placeholder for that field is brought down in the XML, so it’s as if that node doesn’t exist.&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;The example I will use for this blog is a Weekly Status form template (based off the Meeting Agenda sample) within a Meeting Workspace where you pull in Active Tasks from a SharePoint Task List on demand so that a snapshot of the tasks is saved within the form. The purpose of this is so that at a later time, the Weekly Status for that week&amp;#39;s meeting can be opened, and you will see the status of the team&amp;#39;s tasks when the meeting occurred rather than the current point in time. In essence, it becomes an historical record of the team&amp;#39;s tasks just like meeting minutes are intended to be. For the purposes of this blog, I will not go into great detail about meeting workspaces and how they work, but I will briefly explain how InfoPath forms need to be used in order to get the recurring meeting functionality. Here are the steps to accomplish the goal:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Create Tasks List (covered in minimal detail)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Create Meeting Workspace with a Form Library (covered in minimal detail)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Create Form Template&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Install qRules and Inject Form&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Apply CopyTable Command Rule&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Publish the Form and Verify Success&lt;/strong&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Create Tasks List&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create a simple tasks list.&lt;/li&gt;
&lt;li&gt;Add some tasks with a variety of statuses, priorities, and due dates (Fig 1).&lt;/li&gt;&lt;/ul&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img title="Figure01" alt="Figure01" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/copytable/Figure01.png" width="661" height="191" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;em&gt;Fig 1 - Basic tasks list with several tasks added&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Take note that the Active Tasks built-in view only shows tasks that are not completed (Fig 2).&lt;/li&gt;&lt;/ul&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img title="Figure02" alt="Figure02" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/copytable/Figure02.png" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;em&gt;Fig 2 - Active Tasks view only shows incomplete tasks&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Set Active Tasks view as Default View.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Create Meeting Workspace&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create a Basic Meeting Workspace with Recurrence (I prefer to use Outlook 2007 to create my recurring meeting, and then I use the integrated Meeting Workspace feature button to provision my site in SharePoint - Fig 3).&lt;/li&gt;&lt;/ul&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;em&gt;&lt;img title="Figure03" alt="Figure03" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/copytable/Figure03.png" /&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;em&gt;Fig 3 - Creation of Meeting Workspace in Outlook 2007&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Edit the default page of your new Meeting Workspace and close the default web parts (unless you prefer to use one or many later).&lt;/li&gt;
&lt;li&gt;Create Form Library and be sure to NOT click Yes for &amp;quot;Change items into series items&amp;quot; (Fig 4). If we do that, then all forms show on every meeting page (each recurring date). If we leave this as No, then only the relevant form for that meeting will display each week.&lt;/li&gt;&lt;/ul&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;em&gt;&lt;img title="Figure04" alt="Figure04" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/copytable/Figure04.png" width="463" height="435" /&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;em&gt;Fig 4 - Form library within a Meeting Workspace - not a series item&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This will put your new Weekly Status form library on the default page for each recurring meeting within this workspace (Fig 5).&lt;/li&gt;&lt;/ul&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;em&gt;&lt;img title="Figure05" alt="Figure05" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/copytable/Figure05.png" /&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;em&gt;Fig 5 - View of default Meeting Workspace page showing the current week&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Create Form Template&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create new template based on built-in sample Meeting Agenda template and modify to your preference (Fig 6).&lt;/li&gt;&lt;/ul&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;em&gt;&lt;img title="Figure06" alt="Figure06" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/copytable/Figure06.png" /&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;em&gt;Fig 6 - Weekly Status form template&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create a Receive data connection to the &lt;strong&gt;Team Tasks&lt;/strong&gt; SharePoint list, but set it &lt;span style="TEXT-DECORATION:underline;"&gt;NOT&lt;/span&gt; to &amp;quot;Automatically retrieve data when form is opened&amp;quot; (Fig 7). Be sure to choose only the fields you want to ultimately see in the form, because this will play a big part in our CopyTable command.&lt;/li&gt;&lt;/ul&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;em&gt;&lt;img title="Figure07" alt="Figure07" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/copytable/Figure07.png" width="277" height="116" /&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;em&gt;Fig 7 - Tasks data connection with automatic retrieval check box de-selected&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create data structure in form template that exactly matches the data structure of the SharePoint data connection. Your SharePoint Tasks list data connection will include whatever fields you selected during the creation of the data connection from step 2. Simply go to the Data Source pain in InfoPath and choose your &amp;quot;Tasks (Secondary)&amp;quot; data source. Drill down until you get to the nodes. You will notice that the fields within the Tasks repeating group are attributes and not elements (this is important). &lt;font color="#ff0000"&gt;&lt;em&gt;*Note: You can also see the raw data structure by clicking Save As Source Files and opening your Tasks.xsd file in notepad.&lt;/em&gt;&lt;/font&gt; Now, go back to your main data source and add a new non-repeating group (aka Table) that includes the Tasks repeating group (aka Row) and all the attribute fields (Columns). Be sure that the field names and data types match &lt;span style="TEXT-DECORATION:underline;"&gt;exactly&lt;/span&gt; for the attribute fields (Fig 8 ).&lt;/li&gt;&lt;/ul&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;em&gt;&lt;img title="Figure08" alt="Figure08" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/copytable/Figure08.png" width="362" height="194" /&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;em&gt;Fig 8 - Tasks node structure in main data source matching SharePoint secondary data source&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Drag repeating Tasks group from Main data source onto the canvas as a repeating table and configure the columns/fields (Fig 9). 
&lt;ul&gt;
&lt;li&gt;Stretch and shrink the columns so that the data will display properly&lt;/li&gt;
&lt;li&gt;Change the Complete column header to %&lt;/li&gt;
&lt;li&gt;Change the % field control format to show Percentage with ndecimal places&lt;/li&gt;
&lt;li&gt;Change the Due Date field control to a Date Picker (optional)&lt;/li&gt;
&lt;li&gt;You&amp;#39;ll also probably want all of these to be read-only fields. &lt;font color="#ff0000"&gt;&lt;em&gt;*Note: To make a Date Picker control Read-Only, you set conditional formatting on it that says, “If Due_Date is present, then make control Read-Only.&amp;quot;&lt;/em&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;em&gt;&lt;img title="Figure09" alt="Figure09" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/copytable/Figure09.png" width="607" height="71" /&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;em&gt;Fig 9 - Tasks Main data source repeating table with formatting&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Install qRules and Inject Form&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;After installing &lt;a href="http://www.qdabra.com/en/products/qRules.aspx" target="_blank"&gt;qRules&lt;/a&gt;,&amp;nbsp;you will see that it does far more than CopyTable, but those other commands will be the subject of future blogs. You can also get previously-written explanations and discussions related to qRules &lt;a href="http://www.infopathdev.com/forums/131.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;After a successful install, Inject qRules into the form template (Fig 10)&lt;/li&gt;&lt;/ul&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;em&gt;&lt;img title="Figure10" alt="Figure10" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/copytable/Figure10.png" width="410" height="361" /&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;em&gt;Fig 10 - Injecting form template with qRules&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Apply CopyTable Command Rule&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create button for retrieving Active Tasks on demand and for performing the CopyTable qRules (Fig 11) 
&lt;ul&gt;
&lt;li&gt;Simply drag a &lt;strong&gt;Button&lt;/strong&gt; to the canvas and change the label to something like Show Active Tasks&lt;/li&gt;
&lt;li&gt;Click the &lt;strong&gt;Rules&lt;/strong&gt; button and &lt;strong&gt;Add&lt;/strong&gt; a rule named something like Query Tasks and Copy&lt;/li&gt;
&lt;li&gt;Add an &lt;strong&gt;Action&lt;/strong&gt; that &lt;strong&gt;Queries&lt;/strong&gt; using the Tasks data connection&lt;/li&gt;
&lt;li&gt;Add an &lt;strong&gt;Action&lt;/strong&gt; that &lt;strong&gt;Set&amp;#39;s a Field&amp;#39;s Value&lt;/strong&gt;, choose the &lt;em&gt;Command&lt;/em&gt; node from the &lt;em&gt;QdabraRules (Secondary)&lt;/em&gt; data source, and set the value to this command string: &lt;em&gt;
&lt;blockquote&gt;CopyTable /dsnamesrc=Tasks /tablesrc=/dfs:myFields/dfs:dataFields /rowsrc=dfs:Tasks&lt;br /&gt;/tabledest=my:meetingAgenda/my:Task /rowdest=my:Tasks /empty=yes &lt;/blockquote&gt;&lt;/em&gt;
&lt;ul&gt;
&lt;li&gt;&lt;font color="#ff0000"&gt;&lt;strong&gt;KEY NOTE!! Do not try to paste your command string into the function builder (fx button). Just paste it directly into the Value field.&lt;/strong&gt;&lt;/font&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;dsnamesrc&lt;/strong&gt;: This is the name of your source data connection, which is named Tasks in our example. Remember that this could be different if you apply this elsewhere, so be sure to use the proper name for this attribute&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;tablesrc&lt;/strong&gt;: This is the table within your data source that provides the data. You need to properly type in the hierarchy from the Tasks secondary data connection using the information you found in Figure 8. Notice that the namespace for a SharePoint list is &lt;em&gt;DFS&lt;/em&gt; and not &lt;em&gt;MY&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;rowsrc&lt;/strong&gt;: This is the repeating group that includes the nodes from your SharePoint data connection. Mine is &lt;em&gt;Team_Tasks&lt;/em&gt;, but if you use the default Tasks list from a Team Site, this would just be &lt;em&gt;dfs:Tasks&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;dsnamedest&lt;/strong&gt;: This is not shown, because it defaults to the main data source, but if you needed to copy your data to another secondary data source, you would provide the name of that data connection here.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;tabledest&lt;/strong&gt;: Like tablesrc, this is the table that will receive the data. This uses the structure we created in our main data source in Figure 8. Notice the default namespace for an InfoPath form is &lt;em&gt;MY&lt;/em&gt;, and then my data source root is &lt;em&gt;meetingAgenda&lt;/em&gt; due to using the Meeting Agenda sample template.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;rowdest&lt;/strong&gt;: This is the repeating group where we want to send the data&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;empty&lt;/strong&gt;: This is a field that accepts a yes/no flag based on whether you want to first erase all existing data first from the destination table or not.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;em&gt;&lt;img title="Figure11" alt="Figure11" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/copytable/Figure11.png" /&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;em&gt;Fig 11 - Custom button that queries the SharePoint list and performs the CopyTable command&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Preview the form and click the button to verify that there are no errors and that your repeating table populates with the Active Tasks only (Fig 12).&lt;/li&gt;&lt;/ul&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;em&gt;&lt;img title="Figure12" alt="Figure12" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/copytable/Figure12.png" width="605" height="143" /&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;em&gt;Fig 12 - Repeating table in main data source showing Active Tasks&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Publish the Form and Verify Success&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Publish&lt;/strong&gt; the form, go to your &lt;strong&gt;Meeting Workspace&lt;/strong&gt;, and click &lt;strong&gt;New&lt;/strong&gt; in the form library&lt;/li&gt;
&lt;li&gt;Fill out the form as much as you want&lt;/li&gt;
&lt;li&gt;Click the &lt;strong&gt;Show Active Tasks&lt;/strong&gt; button, ensure it populates the table, and then click &lt;strong&gt;Save&lt;/strong&gt; to save the form back to the library&lt;/li&gt;
&lt;li&gt;When you see the XML form in the library, click on it and verify that you still see the data&lt;/li&gt;
&lt;li&gt;Close the form, then go change an active task to mark it as completed so that it doesn&amp;#39;t show up in our Active Tasks view (Fig 13/14)&lt;/li&gt;&lt;/ul&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img title="Figure13" alt="Figure13" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/copytable/Figure13.png" width="626" height="389" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img title="Figure14" alt="Figure14" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/copytable/Figure14.png" width="604" height="145" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;em&gt;Fig 13/14 – CopyTable task complete and no longer active&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Re-open your existing form (Fig 15) and notice that you still see the previous data (3 tasks, not 2). This is the desired behavior, because we want to know the status of our Active Tasks at the time of the meeting, not later after the meeting when we re-open the form. If we were only showing the secondary data source, then we would always see the current Active Tasks, which is not desired. If you were to click the button again, then it would update with the new tasks, but that is not the intent here (feel free to apply conditional formatting to hide the button after it is saved). You would only hit the button on new forms when conducting future meetings.&lt;/li&gt;&lt;/ul&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;em&gt;&lt;img title="Figure15" alt="Figure15" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/copytable/Figure15.png" /&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;em&gt;Fig 15 – Final view of completed form&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Another point of note is that we aren&amp;#39;t using the &lt;a href="http://claytoncobb.wordpress.com/2009/06/20/auto-generating-filenames-for-infopath-forms/" target="_blank"&gt;Auto-Generating Filenames for InfoPath Forms&lt;/a&gt; concept, because if you use submit in a Meeting Workspace, then it saves the XML form to the root of the form library, which then makes it not visible to any of the recurring meeting dates. Using save allows it to save to its respective meeting (Fig 16) date and thus only see one form per meeting and ensuring that you only see the snapshot of active tasks at that given date.&lt;/li&gt;&lt;/ul&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;em&gt;&lt;img title="Figure16" alt="Figure16" src="http://www.infopathdev.com/blogs/mel_balsamo/images/qRules/copytable/Figure16.png" /&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;em&gt;Fig 16 – Saved form shows up in proper meeting date&lt;/em&gt;&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=49682" width="1" height="1"&gt;</description><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/list/default.aspx">list</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/qRules/default.aspx">qRules</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/CopyTable/default.aspx">CopyTable</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/lists/default.aspx">lists</category></item><item><title>Add a License to DBXL without using DAT</title><link>http://www.infopathdev.com/blogs/hilary/archive/2009/11/20/add-a-license-to-dbxl-without-using-dat.aspx</link><pubDate>Fri, 20 Nov 2009 23:45:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:49315</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Licenses can be added for DBXL using the DBXL Admin Tool (DAT) or using the DBXL Licensing web service.&lt;/p&gt;
&lt;p&gt;To add a license via web service, you must open a web browser on the server where DBXL is installed. Copy your license file to that server, and make a note of the file path.&lt;/p&gt;
&lt;p&gt;In your web browser, navigate to:&lt;br /&gt;&lt;a href="http://%3cservername%3e/QdabraWebService/default.htm"&gt;http://&amp;lt;servername&amp;gt;/QdabraWebService/default.htm&lt;br /&gt;&lt;/a&gt;with &amp;lt;servername&amp;gt; replaced with the correct address for your install. &lt;/p&gt;
&lt;p&gt;Select &lt;strong&gt;DBXL License Management&lt;/strong&gt; from the Web Service descriptions:&lt;br /&gt;&lt;img style="WIDTH:329px;HEIGHT:500px;" title="default.htm" alt="default.htm" src="http://www.infopathdev.com/blogs/hilary/AddLicense/AddLic1.png" width="329" height="500" /&gt;&lt;/p&gt;
&lt;p&gt;Select &lt;strong&gt;AddLicenseFromFile&lt;/strong&gt; from the DBXL Licensing page:&lt;br /&gt;&lt;img style="WIDTH:373px;HEIGHT:302px;" title="AddLicense" alt="AddLicense" src="http://www.infopathdev.com/blogs/hilary/AddLicense/AddLic2.png" width="373" height="302" /&gt;&lt;/p&gt;
&lt;p&gt;The method page opens:&lt;br /&gt;&lt;img style="WIDTH:482px;HEIGHT:319px;" title="Method Page" alt="Method Page" src="http://www.infopathdev.com/blogs/hilary/AddLicense/AddLic3.png" width="482" height="319" /&gt;&lt;/p&gt;
&lt;p&gt;Enter the contact email for your license. Enter the file path to the local copy of the license:&lt;br /&gt;&lt;img style="WIDTH:442px;HEIGHT:131px;" title="Parameters" alt="Parameters" src="http://www.infopathdev.com/blogs/hilary/AddLicense/AddLic4.png" width="442" height="131" /&gt;&lt;/p&gt;
&lt;p&gt;Click the &lt;strong&gt;Invoke&lt;/strong&gt; button:&lt;br /&gt;&lt;img style="WIDTH:414px;HEIGHT:142px;" title="xml response" alt="xml response" src="http://www.infopathdev.com/blogs/hilary/AddLicense/AddLic5.png" width="414" height="142" /&gt;&lt;/p&gt;
&lt;p&gt;The XML response will show &lt;strong&gt;Success&lt;/strong&gt; as true or false. If there are any errors configuring the license, those will be returned as well. For example, if you add a license that is alread installed:&lt;br /&gt;&lt;img style="WIDTH:628px;HEIGHT:164px;" title="xml response" alt="xml response" src="http://www.infopathdev.com/blogs/hilary/AddLicense/AddLic6.png" width="628" height="164" /&gt;&lt;/p&gt;
&lt;p&gt;Be sure to check out the other methods for licensing as well. You can use &lt;strong&gt;GetLicenseInfo2&lt;/strong&gt;, for example, to return the information about installed licenses, and then use the serial number returned for the &lt;strong&gt;RemoveLicense&lt;/strong&gt; method.&lt;br /&gt;&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=49315" width="1" height="1"&gt;</description></item><item><title>Sloooooooooooowwwwww Form</title><link>http://www.infopathdev.com/blogs/hilary/archive/2009/11/17/sloooooooooooowwwwww-form.aspx</link><pubDate>Tue, 17 Nov 2009 21:18:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:49166</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;If you&amp;#39;ve ever tried to speed up a slow form, you&amp;#39;ve probably come across this link at &lt;a href="http://msdn.microsoft.com/en-us/library/bb380251.aspx"&gt;MSDN&lt;/a&gt;. It is great and has some useful advice and troubleshooting. &lt;/p&gt;
&lt;p&gt;However, I have found one single culprit that has caused an unbelievable performance hit in some of my forms, and recently talked to another designer who was able to fix a slow form by de-selecting a single checkbox in a dropdown control:&lt;br /&gt;&lt;img style="WIDTH:359px;HEIGHT:288px;" title="Unique Entries" alt="Unique Entries" src="http://www.infopathdev.com/blogs/hilary/slowform1.png" width="359" height="288" /&gt;&lt;/p&gt;
&lt;p&gt;In both cases, de-selecting the checkbox to show only entries with unique display names quickly resolved performance issues. So, if you have a slow form, by all means, check out the suggestions on MSDN, but first, try changing your drop down controls and see if it makes a difference for you as well.&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=49166" width="1" height="1"&gt;</description></item><item><title>Submit Items to a SharePoint List with qRules v2.0!</title><link>http://www.infopathdev.com/blogs/hilary/archive/2009/11/17/submit-items-to-a-sharepoint-list-with-qrules-v2-0.aspx</link><pubDate>Mon, 16 Nov 2009 22:41:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:49123</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;&lt;a href="http://www.qdabra.com/en/products/qRules.aspx" target="_blank"&gt;&lt;b&gt;qRules 2.0&lt;/b&gt;&lt;/a&gt; is here, and it has a whole host of cool new commands. One of the real superstars is SubmitToSharePointList. While this command takes a bit more set up than the standard qRules commands, I assure you it is worth the trouble. Once you&amp;#39;ve walked through this demo with me, I think you&amp;#39;ll agree.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Pre-requisites&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;You will need to have installed &lt;b&gt;qRules v2.0&lt;/b&gt; on your machine. You&amp;#39;ll also&amp;nbsp;need to install the &lt;b&gt;InfoPath to SharePoint List Tool&lt;/b&gt; that ships with qRules v2.0, as we will use that tool to create the form to library mapping. And, of course, you&amp;#39;ll need &lt;b&gt;InfoPath 2007&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;The Form&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Let&amp;#39;s make life easy and start with the Sample Expense Report that shipped with InfoPath 2007. Open InfoPath and in the &lt;b&gt;Design a Form Template&lt;/b&gt; dialog, select &lt;b&gt;Customize a Sample&lt;/b&gt;:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList1.png" style="width:154px;height:137px;" title="Customize Sample" alt="Customize Sample" width="154" height="137" /&gt;&lt;/p&gt;
&lt;p&gt;From the &lt;b&gt;Getting Started &lt;/b&gt;dialog, select &lt;b&gt;Sample - Expense Report&lt;/b&gt;:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList2.png" style="width:460px;height:96px;" title="Select Expense Report" alt="Select Expense Report" width="460" height="96" /&gt;&lt;/p&gt;
&lt;p&gt;When the template opens in design mode, save a copy some place where you&amp;#39;ll be able to find it again. Then close the template. We&amp;#39;ll want to inject it with qRules before we go any further, but first, let&amp;#39;s create .... &lt;/p&gt;
&lt;p&gt;&lt;b&gt;The List&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Create a list on a SharePoint site for your Expense Items from your Expense Report form. I&amp;#39;ve created a custom list that has columns for the Item, the Item Date, the Category and the Amount:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList3.png" style="width:370px;height:198px;" title="ShP List" alt="ShP List" width="370" height="198" /&gt;&lt;/p&gt;
&lt;p&gt;Note the data types for the list items! Amount is currency, Item Date is Date and Time.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Injecting&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;We need to inject our form template with qRules in order to be able to use it. Make sure your form template is closed, and then open qRules:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList4.png" style="width:413px;height:364px;" title="Open qRules Injector" alt="Open qRules Injector" width="413" height="364" /&gt;&lt;/p&gt;
&lt;p&gt;Browse to your form template, or drag and drop the template file onto the injector window and select the &lt;b&gt;Inject! &lt;/b&gt;button. Logging information will be written to the injector&amp;#39;s output window, and you&amp;#39;ll get a message that the injection was successful:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList5.png" style="width:284px;height:208px;" title="Select Form Template" alt="Select Form Template" width="284" height="208" /&gt;&lt;/p&gt;
&lt;p&gt;Select &lt;b&gt;Ok&lt;/b&gt; in the success message dialog, and close the qRules Injector.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Mapping&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Next we need to create the mapping.xml file that qRules will use to know what form field should be submitted to what list column. For this activity, we will use the &lt;b&gt;InfoPath To SharePoint List Tool&lt;/b&gt; that was included with your qRules v 2.0 purchase (fun side note -- you can also &lt;a href="http://www.infopathdev.com/blogs/jo-anne_alfafara/archive/2009/04/04/how-to-use-qdabra-s-infopath-to-sharepoint-list-tool.aspx"&gt;use this tool&lt;/a&gt; without qRules for bulk list data loading operations!)&lt;br /&gt;&lt;br /&gt;You can open the tool from the install location (the default is &lt;b&gt;C:\Program Files\Qdabra Software\Qdabra InfoPath to SharePoint List Tool&lt;/b&gt;) or from InfoPath. The form will open to the &lt;b&gt;Import Forms &lt;/b&gt;tab. That tab is for bulk upload operations -- for simple mapping, select the &lt;b&gt;Define Mapping&lt;/b&gt;&amp;nbsp;tab:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList6.png" style="width:676px;height:543px;" title="IPtoShPList Import Tab" alt="IPtoShPList Import Tab" width="676" height="543" /&gt;&lt;/p&gt;
&lt;p&gt;Attach the Expense Report template that we just injected with qRules to the &lt;b&gt;Source XSN&lt;/b&gt; field:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList7.png" style="width:485px;height:73px;" title="SourceXSN" alt="SourceXSN" width="485" height="73" /&gt;&lt;/p&gt;
&lt;p&gt;Fill in the site URL for the SharePoint site where you created your list for your Expense Report items, and select the &lt;b&gt;Get SharePoint Lists&lt;/b&gt; button:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList8.png" style="width:633px;height:49px;" title="Get ShP Lists" alt="Get ShP Lists" width="633" height="49" /&gt;&lt;/p&gt;
&lt;p&gt;Select the list you created, and select the &lt;b&gt;Extract Schemas&lt;/b&gt; button:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList9.png" style="width:640px;height:53px;" title="Extract Schemas" alt="Extract Schemas" width="640" height="53" /&gt;&lt;/p&gt;
&lt;p&gt;Our Item data in our Expense Report form is repeating, so select the &lt;b&gt;Data is from Repeating Group&lt;/b&gt; check box in the &lt;b&gt;Mapping Definition &lt;/b&gt;section:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList10.png" style="width:202px;height:51px;" title="Is Repeating" alt="Is Repeating" width="202" height="51" /&gt;&lt;/p&gt;
&lt;p&gt;Select the &lt;b&gt;...&lt;/b&gt; button next to the &lt;b&gt;Repeating Group&lt;/b&gt; field:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList11.png" style="width:393px;height:53px;" title="... button" alt="... button" width="393" height="53" /&gt;&lt;/p&gt;
&lt;p&gt;A custom task pane will open, displaying the schema of our attached template:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList12.png" style="width:236px;height:114px;" title="Custom Task Pane" alt="Custom Task Pane" width="236" height="114" /&gt;&lt;/p&gt;
&lt;p&gt;Navigate to the repeating &lt;b&gt;item&lt;/b&gt; node:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList13.png" style="width:207px;height:288px;" title="item Node" alt="item Node" width="207" height="288" /&gt;&lt;/p&gt;
&lt;p&gt;And double-click to select and populate the &lt;b&gt;Repeating Group&lt;/b&gt; field with the correct XPath:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList14.png" style="width:400px;height:102px;" title="Repeating Group" alt="Repeating Group" width="400" height="102" /&gt;&lt;/p&gt;
&lt;p&gt;We can now use the task pane to map the form fields from the &lt;b&gt;item&lt;/b&gt; group to the correct columns in our list. Select the &lt;b&gt;... &lt;/b&gt;button next to the &lt;b&gt;Form Field&lt;/b&gt; column field:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList15.png" style="width:408px;height:71px;" title="Form Field" alt="Form Field" width="408" height="71" /&gt;&lt;/p&gt;
&lt;p&gt;And double-click the &lt;b&gt;date&lt;/b&gt;&amp;nbsp;node inside the &lt;b&gt;item &lt;/b&gt;group:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList16.png" style="width:180px;height:194px;" title="Date Node" alt="Date Node" width="180" height="194" /&gt;&lt;/p&gt;
&lt;p&gt;From the drop down list control in the &lt;b&gt;SharePoint Column&lt;/b&gt; column, select the column you wish to save the &lt;b&gt;date&lt;/b&gt; information to -- in my sample list, that would be the &lt;b&gt;Item Date&lt;/b&gt; column:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList17.png" style="width:252px;height:117px;" title="Date column" alt="Date column" width="252" height="117" /&gt;&lt;/p&gt;
&lt;p&gt;Add another row to the table and continue mapping in this manner until all your fields and columns are mapped:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList18.png" style="width:643px;height:277px;" title="Completed Mapping" alt="Completed Mapping" width="643" height="277" /&gt;&lt;/p&gt;
&lt;p&gt;Select the &lt;b&gt;Save As qRules Mapping&lt;/b&gt; button to save the mapping.xml somewhere you can easily find it in the next steps. You can name the file whatever you choose, but mapping.xml is the default:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList19.png" style="width:187px;height:28px;" title="Save Mapping" alt="Save Mapping" width="187" height="28" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Add Data Connections to the Form&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Open your injected Expense Report in design mode. We need to add two data connections to our form. First, we need to add a receive data connection to the mapping.xml file we just created.&lt;/p&gt;
&lt;p&gt;Navigate to &lt;b&gt;Tools &amp;gt; Data Connections&lt;/b&gt; to open the &lt;b&gt;Data Connections&lt;/b&gt; dialog:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList20.png" style="width:153px;height:191px;" title="Tools / Data connections" alt="Tools / Data connections" width="153" height="191" /&gt;&lt;/p&gt;
&lt;p&gt;Select &lt;b&gt;Add&lt;/b&gt; to add a new data connection:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList21.png" style="width:440px;height:141px;" title="Add" alt="Add" width="440" height="141" /&gt;&lt;/p&gt;
&lt;p&gt;Select &lt;b&gt;Create a new connection to Receive Data&lt;/b&gt;:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList22.png" style="width:173px;height:78px;" title="Create New" alt="Create New" width="173" height="78" /&gt;&lt;/p&gt;
&lt;p&gt;Select &lt;b&gt;Next&lt;/b&gt;, and then leave the source as &lt;b&gt;XML Document&lt;/b&gt;:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList23.png" style="width:253px;height:178px;" title="Xml Doc " alt="Xml Doc " width="253" height="178" /&gt;&lt;/p&gt;
&lt;p&gt;Select &lt;b&gt;Next&lt;/b&gt;, then browse to the mapping file we just created:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList24.png" style="width:485px;height:80px;" title="mapping" alt="mapping" width="485" height="80" /&gt;&lt;/p&gt;
&lt;p&gt;Select &lt;b&gt;Next&lt;/b&gt;, leaving the default as is, to add the XML file as a resource file to the form:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList25.png" style="width:396px;height:104px;" title="Next" alt="Next" width="396" height="104" /&gt;&lt;/p&gt;
&lt;p&gt;Select &lt;b&gt;Next&lt;/b&gt; for the final time, and either leave the default name or give the data connection a new name (make a note of it! You&amp;#39;ll need it in a few short minutes!). Be sure to leave the default selected to automatically retrieve the data when the form is opened and select &lt;b&gt;Finish&lt;/b&gt; to complete this data connection.&lt;/p&gt;
&lt;p&gt;The &lt;b&gt;Data Connection&lt;/b&gt; dialog should still be open, so save yourself a click or two, and select the &lt;b&gt;Add &lt;/b&gt;button again. This time we are going to add a submit data connection to the SharePoint List we want to submit our data to:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList27.png" style="width:208px;height:79px;" title="Submit data connection" alt="Submit data connection" width="208" height="79" /&gt;&lt;/p&gt;
&lt;p&gt;Select (you guessed it, you clever thing) &lt;b&gt;Next&lt;/b&gt;, and leave the default of &lt;b&gt;To a Web service&lt;/b&gt;:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList28.png" style="width:414px;height:106px;" title="To Web Service" alt="To Web Service" width="414" height="106" /&gt;&lt;/p&gt;
&lt;p&gt;Enter the URL to the lists web service for the site where you created your Expenses list:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList29.png" style="width:391px;height:81px;" title="Url" alt="Url" width="391" height="81" /&gt;&lt;/p&gt;
&lt;p&gt;Select &lt;b&gt;Next&lt;/b&gt; and select the &lt;b&gt;UpdateListItems&lt;/b&gt; operation (no, the operations are &lt;b&gt;not&lt;/b&gt; in alphabetical order. Yes, that &lt;b&gt;does&lt;/b&gt;&amp;nbsp;bother me, too):&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList30.png" style="width:245px;height:314px;" title="Select Operation" alt="Select Operation" width="245" height="314" /&gt;&lt;/p&gt;
&lt;p&gt;Select &lt;b&gt;Next&lt;/b&gt;. We are going to use values from our mapping data connection for our operation parameters. For the &lt;b&gt;tns:ListName&lt;/b&gt; parameter, select the &lt;b&gt;ListCollection &lt;/b&gt;node from our mapping data connection:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList31.png" style="width:263px;height:216px;" title="ListName param" alt="ListName param" width="263" height="216" /&gt;&lt;/p&gt;
&lt;p&gt;The &lt;b&gt;Data Connection Wizard&lt;/b&gt; dialog will look like this:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList32.png" style="width:486px;height:216px;" title="List Param" alt="List Param" width="486" height="216" /&gt;&lt;/p&gt;
&lt;p&gt;For the &lt;b&gt;tns:updates&lt;/b&gt; parameter, we&amp;#39;ll select the entire &lt;b&gt;Batch&lt;/b&gt; node from our mapping data connection:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList33.png" style="width:260px;height:174px;" title="Batch node" alt="Batch node" width="260" height="174" /&gt;&lt;/p&gt;
&lt;p&gt;The &lt;b&gt;Include&lt;/b&gt; drop down needs to be changed to &lt;b&gt;Entire XML subtree, including selected element&lt;/b&gt;:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList34.png" style="width:470px;height:156px;" title="Include ddl" alt="Include ddl" width="470" height="156" /&gt;&lt;/p&gt;
&lt;p&gt;Before selecting &lt;b&gt;Next&lt;/b&gt;, take a minute to verify that&amp;nbsp;your &lt;b&gt;Data Connection Wizard&lt;/b&gt; looks like mine:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList35.png" style="width:630px;height:424px;" title="Data Connection" alt="Data Connection" width="630" height="424" /&gt;&lt;/p&gt;
&lt;p&gt;Select &lt;b&gt;Next&lt;/b&gt;. You can leave the default data connection name, or enter one of your own choosing before clicking &lt;b&gt;Finish&lt;/b&gt;. Make sure you name it something you can remember, because we&amp;#39;ll need that information for our qRules command!&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList36.png" style="width:290px;height:68px;" title="Final Screen" alt="Final Screen" width="290" height="68" /&gt;&lt;/p&gt;
&lt;p&gt;Close the &lt;b&gt;Data Connection&lt;/b&gt;&amp;nbsp;dialog -- we have all our data connections in place.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Add a Field for the List Item ID&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;This bit is optional. But if we want to connect our form items to our SharePoint list, so that we can update existing items rather than always creating new items, we need an ID field in our repeating group to hold the value. &lt;/p&gt;
&lt;p&gt;Open the &lt;b&gt;Data Source Task Pane&lt;/b&gt; in the form and navigate to the repeating &lt;b&gt;item&lt;/b&gt; node. Add a field to hold the ID -- I named mine &amp;#39;id&amp;#39;, but you are welcome to get all creative. I also moved mine to the top of the group -- if you are less neurotic than I (likely), feel free to leave the field at the bottom of the group:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList37.png" style="width:193px;height:133px;" title="id field" alt="id field" width="193" height="133" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Add the qRules Command&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;After all that setup, adding the actual command may be a bit anti-climatic, and I apologize for that. However, now that all the pieces are in place, we have it pretty easy. &lt;/p&gt;
&lt;p&gt;Navigate to &lt;b&gt;Tools &amp;gt; Submit Options&lt;/b&gt;:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList38.png" style="width:224px;height:148px;" title="Submit Options" alt="Submit Options" width="224" height="148" /&gt;&lt;/p&gt;
&lt;p&gt;This form is already set up to submit via email to the email entered in the &lt;b&gt;managerEmailAddress&lt;/b&gt;, so we are going to modify the submit options to use rules. We&amp;#39;ll submit to our SharePoint List using a qRules command, then send the form to the manager in email.&lt;/p&gt;
&lt;p&gt;Select &lt;b&gt;Perform custom action using Rules&lt;/b&gt; in the &lt;b&gt;Submit Options&lt;/b&gt; dialog:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList39.png" style="width:399px;height:346px;" title="Submit with Rules" alt="Submit with Rules" width="399" height="346" /&gt;&lt;/p&gt;
&lt;p&gt;Select the &lt;b&gt;Rules&lt;/b&gt; button:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList40.png" style="width:498px;height:127px;" title="Rules" alt="Rules" width="498" height="127" /&gt;&lt;/p&gt;
&lt;p&gt;The &lt;b&gt;Rules for Submitting Forms&lt;/b&gt; dialog opens. Select the &lt;b&gt;Add &lt;/b&gt;button to open the &lt;b&gt;Rule&lt;/b&gt; dialog:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList41.png" style="width:444px;height:162px;" title="Rule dialog" alt="Rule dialog" width="444" height="162" /&gt;&lt;/p&gt;
&lt;p&gt;Give your rule a meaningful name (trust me, you do NOT want to get me started on why &amp;#39;Rule1&amp;#39; is a miserable naming convention), and select the &lt;b&gt;Add Action &lt;/b&gt;button to open the &lt;b&gt;Action&lt;/b&gt; dialog:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList43.png" style="width:337px;height:269px;" title="Action dialog" alt="Action dialog" width="337" height="269" /&gt;&lt;/p&gt;
&lt;p&gt;The action will be &lt;b&gt;Set a field&amp;#39;s value&lt;/b&gt;, and the field to set will be the QdabraRules Command node:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList44.png" style="width:260px;height:176px;" title="Command node" alt="Command node" width="260" height="176" /&gt;&lt;/p&gt;
&lt;p&gt;And finally, the value will be:&lt;br /&gt;&lt;b&gt;SubmitToSharePointList /submit=ShPListSubmit /mapping=mapping /id=my:id&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The /submit parameter takes as a value the name of the data connection we set up to the lists webservice for our SharePoint site. The /mapping parameter takes the name of the data connection we set up to the mapping file we created with the &lt;b&gt;InfoPath To SharePoint List Tool&lt;/b&gt;. The /id parameter takes the &lt;b&gt;&lt;i&gt;relative&lt;/i&gt;&lt;/b&gt; XPath to our Id node (if we weren&amp;#39;t working with repeating data, it would take the full path).&lt;/p&gt;
&lt;p&gt;Set up one more rule with the action of submitting using a data connection to include the email submit the sample came with.You&amp;#39;ll have two actions now in your rule:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList45.png" style="width:447px;height:350px;" title="Rules" alt="Rules" width="447" height="350" /&gt;&lt;/p&gt;
&lt;p&gt;Select &lt;b&gt;OK &lt;/b&gt;until all the dialogs are closed.&lt;/p&gt;
&lt;p&gt;And now, to test!&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Previewing the Form&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Preview your expense report. Fill in an email for the &amp;#39;manager&amp;#39; (I always use my own when testing) and then add some items to the report:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList46.png" style="width:584px;height:289px;" title="Preview" alt="Preview" width="584" height="289" /&gt;&lt;/p&gt;
&lt;p&gt;Check your SharePoint list after submitting:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList47.png" style="width:523px;height:207px;" title="ShP List" alt="ShP List" width="523" height="207" /&gt;&lt;/p&gt;
&lt;p&gt;Ta-da! Items! &lt;/p&gt;
&lt;p&gt;But wait, there&amp;#39;s more. Perhaps we didn&amp;#39;t really go to Disneyland, we went someplace a little less...exotic. Change the value in the form:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList48.png" style="width:570px;height:198px;" title="Change Form" alt="Change Form" width="570" height="198" /&gt;&lt;/p&gt;
&lt;p&gt;And submit again. Refresh (or re-open)&amp;nbsp;your SharePoint list:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/SubmitToShPList/SubmitToShPList49.png" style="width:524px;height:191px;" title="Refreshed list" alt="Refreshed list" width="524" height="191" /&gt;&lt;/p&gt;
&lt;p&gt;Who&amp;#39;s got your back, baby? Why, &lt;b&gt;Qdabra&lt;/b&gt;, that&amp;#39;s who. qRules populated our &lt;b&gt;id &lt;/b&gt;node, and now those expense items are connected to the list items.&lt;/p&gt;
&lt;p&gt;Sure, sure, you can do this with a CAML query as outlined &lt;a href="http://www.infopathdev.com/blogs/matt/archive/2006/02/02/Add-SharePoint-List-Items-with-InfoPath.aspx"&gt;here&lt;/a&gt;. Of course, if you do that, you&amp;#39;ve got to go off and decode the list GUID. You&amp;#39;ve got to know what SharePoint is calling your columns. For example, in my list, the &lt;b&gt;Item&lt;/b&gt; column started out as the &lt;b&gt;Title&lt;/b&gt; column, but I renamed it. SharePoint still thinks of it as &lt;b&gt;Title&lt;/b&gt;. The &lt;b&gt;Item Date&lt;/b&gt; column -- I initially called that &lt;b&gt;Item&lt;/b&gt;, so SharePoint will call it &lt;b&gt;Item&lt;/b&gt; from now till eternity. And, if you want to take the CAML approach and you have repeating data, you are going to have to write some code... or have some little button on every single row for single items submits.&lt;/p&gt;
&lt;p&gt;For simpler set up, for no code, and for the nifty update feature, I&amp;#39;d take the qRules route. I hope you will, too!&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Errors&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;What? Something went wrong? If you followed the tutorial but when you use the SubmitToSharePointList command in qRules you don&amp;#39;t have any items auto-magically appearing in your list, be sure you check the &lt;b&gt;QdabraRules&lt;/b&gt; data source error node. We return errors to a node to ensure that you can use qRules in browser forms, but it does mean that you need to take responsibility for error handling. For testing purposes, you can just drag the error node onto your form canvas, click the submit button and go from there. For production, you can return the error in an expression box or a dialog box expression (depending if your form needs to be browser compatible). For additional information on this and other great qRules commands, check out the documentation or the sample form that you&amp;#39;ll find in your install location (generally&lt;b&gt; C:\Program Files\Qdabra Software\Qdabra Rules Library&lt;/b&gt;).&lt;/p&gt;
&lt;p&gt;Also, both the &lt;b&gt;SubmitToSharePointList &lt;/b&gt;command and the &lt;b&gt;InfoPath to SharePoint List Tool &lt;/b&gt;will not work with attributes. The fields you are trying to submit to SharePoint need to be elements.&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=49123" width="1" height="1"&gt;</description></item><item><title>QuerySharepoint cannot derive a schema with blank fields</title><link>http://www.infopathdev.com/blogs/ernesto/archive/2009/10/26/querysharepoint-cannot-derive-a-schema-with-blank-fields.aspx</link><pubDate>Mon, 26 Oct 2009 21:53:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:48245</guid><dc:creator>ErnestoM</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;The QuerySharepoint web service allows you to retrieve data from a SharePoint list. It requires a &amp;lt;query&amp;gt; parameter, which can be built using the QueryBuilder form that comes with DBXL. QueryBuilder allows you to specify the columns you wish to retrieve.&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/48241/original.aspx" alt="" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;In the screenshot above, you can see that I wish to retrieve three columns. I generate my query and proceed to create the data connections in my form. In InfoPath, I go to Tools &amp;gt; Data connections and create a receive-type connection. For the &amp;lt;query&amp;gt; parameter, I enter:&lt;/p&gt;&lt;p&gt;&lt;i&gt;&amp;lt;query maxrows=&amp;#39;2&amp;#39;&amp;gt;&amp;lt;columns&amp;gt;&amp;lt;column name=&amp;#39;Category&amp;#39;/&amp;gt;&amp;lt;column name=&amp;#39;Unit_x0020_of_x0020_Measure&amp;#39;/&amp;gt;&amp;lt;column name=&amp;#39;ProductCode&amp;#39;/&amp;gt;&amp;lt;/columns&amp;gt;&amp;lt;/query&amp;gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Notice that the data source taskpane will show me the xml structure that was returned by this new data connection:&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/48242/original.aspx" alt="" /&gt; &lt;br /&gt;&lt;/p&gt;&lt;p&gt;Where are my other two columns?! This issue was recently encountered by one of the users of DBXL (&lt;a href="http://www.infopathdev.com/forums/t/13521.aspx"&gt;read it here&lt;/a&gt;).&lt;/p&gt;&lt;p&gt;If we look at the source SharePoint list, we’ll notice that the first two items in my list contain blank values in those columns.&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/48243/original.aspx" alt="" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Because of these blank values, the web service was unable to derive the correct schema.&lt;/p&gt;&lt;p&gt;The workaround is simple: increase the value of the maxrows parameter. Then the data connection “sees” that third row, and returns the columns correctly:&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/48244/original.aspx" alt="" /&gt; &lt;br /&gt;&lt;/p&gt;&lt;p&gt;That’s a bit tedious, especially if you have a large list with many blank values. So the workaround becomes even simpler: remove the maxrows parameter!&lt;br /&gt;&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=48245" width="1" height="1"&gt;</description><category domain="http://www.infopathdev.com/blogs/ernesto/archive/tags/querybuilder/default.aspx">querybuilder</category><category domain="http://www.infopathdev.com/blogs/ernesto/archive/tags/Querysharepoint/default.aspx">Querysharepoint</category></item><item><title>Use DBXL Submit with Existing SQL Data!</title><link>http://www.infopathdev.com/blogs/hilary/archive/2009/10/13/use-dbxl-submit-with-existing-sql-data.aspx</link><pubDate>Tue, 13 Oct 2009 15:01:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:47854</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;So, you&amp;#39;ve invested in DBXL, which is great news for your organization -- all of our web services can speed your form development, help you create more performant forms, give you a great deal of flexibility for saving the data from your forms to different SQL tables and generally make you look like an InfoPath super-hero.&lt;/p&gt;
&lt;p&gt;There&amp;#39;s just one problem. You have a legacy form, built the old-fashioned way, based off a database. You have one (or more) tables that this form has been submitting to. You want to be able to update your existing data, like you can with your legacy form, but you want to start using DBXL for submitting your data to SQL. Patrick Halstead describes the current DBXL architecture &lt;a href="http://www.infopathdev.com/blogs/patrick/archive/2008/07/09/using-dbxl-with-existing-databases.aspx"&gt;here&lt;/a&gt;, and since DBXL takes a delete then insert approach to SQL, you don&amp;#39;t have a way to update your existing&amp;nbsp;rows..... Now what?&lt;/p&gt;
&lt;p&gt;Never fear. A little SQL magic and you&amp;#39;ll be back in your cape, saving the day yet again.&lt;/p&gt;
&lt;p&gt;At the highest level, we&amp;#39;ll create a new form, starting with a blank form. We&amp;#39;ll use Qdabra&amp;#39;s QueryDB web service to return existing data to the new form and add a trigger to the main table we shred to that will delete the loaded data when we submit via DBXL. Other Qdabra tools like qRules can assist for special cases, like forms with repeating data sections.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Scenario&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For our sample case, I&amp;#39;ve created a simple database bound expense report form:&lt;br /&gt;&lt;img style="WIDTH:517px;HEIGHT:223px;" title="DB Bound form" alt="DB Bound form" src="http://www.infopathdev.com/blogs/hilary/DBXL%20With%20Existing%20Data/DBXLExistingData1.png" width="517" height="223" /&gt;&lt;/p&gt;
&lt;p&gt;The tables have auto incrementing IDs and a foreign key relationship:&lt;br /&gt;&lt;img style="WIDTH:294px;HEIGHT:325px;" title="Data Tables" alt="Data Tables" src="http://www.infopathdev.com/blogs/hilary/DBXL%20With%20Existing%20Data/DBXLExistingData2.png" width="294" height="325" /&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve already submitted to these tables using my SQL bound form:&lt;br /&gt;&lt;img style="WIDTH:269px;HEIGHT:79px;" title="Expense Reports" alt="Expense Reports" src="http://www.infopathdev.com/blogs/hilary/DBXL%20With%20Existing%20Data/DBXLExistingData3.png" width="269" height="79" /&gt;&lt;br /&gt;&lt;strong&gt;&lt;font size="1"&gt;ExpenseReports (Parent Table)&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="WIDTH:355px;HEIGHT:226px;" title="Expense Items" alt="Expense Items" src="http://www.infopathdev.com/blogs/hilary/DBXL%20With%20Existing%20Data/DBXLExistingData4.png" width="355" height="226" /&gt;&lt;br /&gt;&lt;strong&gt;&lt;font size="1"&gt;ExpenseItems (Child Table)&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The New Form&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In order to make use of this existing data with a form that has been created to submit to DBXL, we will first want to recreate the form, starting from a blank template:&lt;br /&gt;&lt;img style="WIDTH:612px;HEIGHT:310px;" title="Blank Form" alt="Blank Form" src="http://www.infopathdev.com/blogs/hilary/DBXL%20With%20Existing%20Data/DBXLExistingData5.png" width="612" height="310" /&gt;&lt;/p&gt;
&lt;p&gt;My new main data source collects the same data that my old SQL bound form did:&lt;br /&gt;&lt;img style="WIDTH:224px;HEIGHT:230px;" title="Data Source" alt="Data Source" src="http://www.infopathdev.com/blogs/hilary/DBXL%20With%20Existing%20Data/DBXLExistingData10.png" width="224" height="230" /&gt;&lt;/p&gt;
&lt;p&gt;Using Qdabra&amp;#39;s QueryDB web service, I&amp;#39;ve added data connections to first return data from the ExpenseReports table, so that I can select from an existing record:&lt;br /&gt;&lt;img style="WIDTH:564px;HEIGHT:226px;" title="Drop Down with Existing Records" alt="Drop Down with Existing Records" src="http://www.infopathdev.com/blogs/hilary/DBXL%20With%20Existing%20Data/DBXLExistingData6.png" width="564" height="226" /&gt;&lt;/p&gt;
&lt;p&gt;My drop down is bound to the ID field in my form, and while the display value is the name, the value is the record&amp;#39;s original ID.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve added rules to my ID field to populate the Name and Purpose when an ID is selected. I&amp;#39;ve also added a rule to run another QueryDB query to return the items for the selected expense report. Since InfoPath doesn&amp;#39;t currently include a way to copy data from one repeating table to another, you will need to either use code or qRules to copy the returned data if you have a repeating section. I&amp;#39;ve chosen to use qRules:&lt;br /&gt;&lt;img style="WIDTH:510px;HEIGHT:287px;" title="Populated Form" alt="Populated Form" src="http://www.infopathdev.com/blogs/hilary/DBXL%20With%20Existing%20Data/DBXLExistingData8.png" width="510" height="287" /&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve added a web service Submit connection to my form, and I&amp;#39;m using the Submit method of the DBXLDocumentService to sumit my form. At this point, then, my new form can load data previously submitted by my SQL bound form. If I create a new document type in DBXL and create a SQL mapping for my form and database as they currently exist:&lt;br /&gt;&lt;img style="WIDTH:732px;HEIGHT:309px;" title="Initial Mapping" alt="Initial Mapping" src="http://www.infopathdev.com/blogs/hilary/DBXL%20With%20Existing%20Data/DBXLExistingData9.png" width="732" height="309" /&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll be in for a surprise when I submit my form after having loaded it with existing data and modified some information. I&amp;#39;ll end up with new SQL rows for the same data!&lt;br /&gt;&lt;img style="WIDTH:391px;HEIGHT:103px;" title="Modified Row" alt="Modified Row" src="http://www.infopathdev.com/blogs/hilary/DBXL%20With%20Existing%20Data/DBXLExistingData11.png" width="391" height="103" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Workaround&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;First, we need to make some database changes. Some of you will not be overy excited about what I&amp;#39;m going to suggest here, so please bear with me -- I have another solution that may sit more comfortably with you, but does involve code, and I&amp;#39;ll talk about that at the end of this post. For those of you who don&amp;#39;t want the overhead of adding, writing and maintaining code, this workaround may be acceptable.&lt;/p&gt;
&lt;p&gt;We need to set our ID on our main table to &lt;strong&gt;not&lt;/strong&gt; auto increment, remove the foreign key relationship between our two tables, and change the ID column on our main table to &lt;strong&gt;not&lt;/strong&gt; be the primary key. In fact, our main table will be without a primary key all together. &lt;/p&gt;
&lt;p&gt;I&amp;#39;m not crazy about removing keys and relationships from my tables. However, since I’m only going to allow data to be entered into my tables from DBXL, and I know that I’m setting up my mapping with the DocId (an int unique to my DBXL install) as the primary key for my parent table and the foreign key to my child table, I feel like I am minimizing my risks. If there comes a day that all of my pre-existing data has been loaded into XML and resaved to the database, I’ll be able to set the DocId as my key in my SQL tables.&lt;/p&gt;
&lt;p&gt;Disclaimers now in place, we&amp;#39;ll forge ahead. We need to add a column to both our parent and child tables for the DBXL DocId and remove the key and auto increment on the ID field in our parent table. We also need to remove our foreign key relationship:&lt;br /&gt;&lt;img style="WIDTH:273px;HEIGHT:326px;" title="Table changes" alt="Table changes" src="http://www.infopathdev.com/blogs/hilary/DBXL%20With%20Existing%20Data/DBXLExistingData12.png" width="273" height="326" /&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll modify our database mapping to incorporate the DocId. I&amp;#39;m going to manually select the DocId as the key for the parent table. I&amp;#39;ll use the DocId field to create a relationship between my tables. I also want to be sure I&amp;#39;m still shredding the original ID from forms that had been previously submitted, because I&amp;#39;ll need that information from my inserted data for my trigger:&lt;br /&gt;&lt;img style="WIDTH:737px;HEIGHT:425px;" title="New Mapping" alt="New Mapping" src="http://www.infopathdev.com/blogs/hilary/DBXL%20With%20Existing%20Data/DBXLExistingData13.png" width="737" height="425" /&gt;&lt;/p&gt;
&lt;p&gt;Finally, I&amp;#39;m adding a trigger to the parent table. This trigger checks to see if there is a row in our parent table that has the same ID as the data being inserted, but a null value in the DocId field. If such a row exists, we know we are dealing with data that has not been inserted by DBXL before, so we need to delete the original rows:&lt;br /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&lt;font color="#0000ff"&gt;USE&lt;/font&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:9pt;"&gt; [QdabraSamples]&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font color="#0000ff" face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;GO&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font color="#0000ff" face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&lt;/span&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font color="#008000" face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;/****** Object:&amp;nbsp; Trigger [dbo].[DemoDelete]&amp;nbsp;&amp;nbsp;&amp;nbsp; Script Date: 10/12/2009 15:12:40 ******/&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&lt;font color="#0000ff"&gt;SET&lt;/font&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:9pt;"&gt; &lt;font color="#0000ff"&gt;ANSI_NULLS&lt;/font&gt; &lt;font color="#0000ff"&gt;ON&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font color="#0000ff" face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;GO&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font color="#0000ff" face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&lt;/span&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&lt;font color="#0000ff"&gt;SET&lt;/font&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:9pt;"&gt; &lt;font color="#0000ff"&gt;QUOTED_IDENTIFIER&lt;/font&gt; &lt;font color="#0000ff"&gt;ON&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font color="#0000ff" face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;GO&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font color="#0000ff" face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&lt;/span&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font color="#008000" face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;-- =============================================&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font color="#008000" face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;-- Author:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hilary Stoupa&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font color="#008000" face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;-- Create date: 2009-10-02&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font color="#008000" face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;-- Description:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Demo Delete Trigger&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font color="#008000" face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;-- =============================================&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&lt;font color="#0000ff"&gt;Create&lt;/font&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:9pt;"&gt; &lt;font color="#0000ff"&gt;TRIGGER&lt;/font&gt; [dbo]&lt;font color="#808080"&gt;.&lt;/font&gt;[DemoDelete] &lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;ON&lt;/font&gt;&amp;nbsp; [dbo]&lt;font color="#808080"&gt;.&lt;/font&gt;[ExpenseReports] &lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;AFTER&lt;/font&gt; &lt;font color="#0000ff"&gt;INSERT&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&lt;font color="#0000ff"&gt;AS&lt;/font&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:9pt;"&gt; &lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font color="#0000ff" face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;BEGIN&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#008000"&gt;-- SET NOCOUNT ON added to prevent extra result sets from&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#008000"&gt;-- interfering with SELECT statements.&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;SET&lt;/font&gt; &lt;font color="#0000ff"&gt;NOCOUNT&lt;/font&gt; &lt;font color="#0000ff"&gt;ON&lt;/font&gt;&lt;font color="#808080"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;Declare&lt;/font&gt; @id &lt;font color="#0000ff"&gt;int&lt;/font&gt;&lt;font color="#808080"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;Set&lt;/font&gt; @id &lt;font color="#808080"&gt;=&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#808080"&gt;(&lt;/font&gt;&lt;font color="#0000ff"&gt;Select&lt;/font&gt; ID &lt;font color="#0000ff"&gt;from&lt;/font&gt; Inserted&lt;font color="#808080"&gt;);&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;Delete&lt;/font&gt; &lt;font color="#0000ff"&gt;from&lt;/font&gt; ExpenseItems&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;Where&lt;/font&gt; ReportID &lt;font color="#808080"&gt;=&lt;/font&gt; @id&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#808080"&gt;AND&lt;/font&gt; DocId &lt;font color="#808080"&gt;is&lt;/font&gt; &lt;font color="#808080"&gt;null;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font color="#808080" face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&lt;/span&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;Delete&lt;/font&gt; &lt;font color="#0000ff"&gt;from&lt;/font&gt; ExpenseReports&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;Where&lt;/font&gt; ID &lt;font color="#808080"&gt;=&lt;/font&gt; @id&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#808080"&gt;AND&lt;/font&gt; DocId &lt;font color="#808080"&gt;is&lt;/font&gt; &lt;font color="#808080"&gt;null;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font color="#808080" face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&lt;/span&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font color="#0000ff" face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;END&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font color="#0000ff" face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&lt;/span&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style="LINE-HEIGHT:normal;MARGIN-TOP:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;MARGIN-BOTTOM:0pt;FONT-SIZE:11pt;"&gt;&lt;font color="#0000ff" face="Calibri"&gt;&lt;span style="FONT-SIZE:9pt;"&gt;GO&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;Now, if we use our new form, and populate with existing data, we don&amp;#39;t end up with duplicate rows:&lt;br /&gt;&lt;img style="WIDTH:459px;HEIGHT:79px;" title="Fresh data set" alt="Fresh data set" src="http://www.infopathdev.com/blogs/hilary/DBXL%20With%20Existing%20Data/DBXLExistingData14.png" width="459" height="79" /&gt;&lt;/p&gt;
&lt;p&gt;We also now have an XML file in the DBXL Administrative Tool&amp;nbsp;that corresponds with our database row. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tidying Up&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Remember that drop down in the new form that allows us to select and load an existing row? That should be modified to only display rows where the DocId field is null in our parent table. Once we have an XML file for a row, we want to open that file to make updates to our data, and allow DBXL to handle the SQL tables as usual.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;An Alternate Route&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;For the programmer, or if you don&amp;#39;t mind the maintenance costs of adding code to your forms, there are other alternatives. For example, you can use custom code for your submit that will run a stored procedure or SQL statement to delete any rows that have the same ID as the data loaded into your form prior to the web service submit. This works well for data that has been using unique identifiers for keys.&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=47854" width="1" height="1"&gt;</description></item><item><title>Swap the AD Alias and Name Fields in Place</title><link>http://www.infopathdev.com/blogs/greg/archive/2009/10/09/swap-the-ad-alias-and-name-fields-in-place.aspx</link><pubDate>Fri, 09 Oct 2009 20:53:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:47769</guid><dc:creator>Greg Collins</dc:creator><slash:comments>1</slash:comments><description>&lt;font size="3" face="Calibri"&gt;
&lt;p style="MARGIN:0in 0in 10pt;" class="MsoNormal"&gt;In this tutorial you will learn how to use perform an in-place swap of an Active Directory alias and display name so as to conserve space in the view. This sample uses a text field and a button along with conditional formatting, rules and data validation to keep things running smoothly.&lt;/p&gt;
&lt;p style="MARGIN:0in 0in 10pt;" class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="MARGIN:0in 0in 10pt;" class="MsoNormal"&gt;&lt;img style="WIDTH:625px;HEIGHT:142px;" src="http://www.infopathdev.com/photos/blog_pictures/images/47944/original.aspx" width="625" height="142" alt="" /&gt;&lt;/p&gt;
&lt;p style="MARGIN:0in 0in 10pt;" class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="MARGIN:0in 0in 10pt;" class="MsoNormal"&gt;While this solution is not for everyone, it will come in very handy for some of you with tight space requirements.&lt;/p&gt;
&lt;p style="MARGIN:0in 0in 10pt;" class="MsoNormal"&gt;Start a new form:&lt;/p&gt;
&lt;p style="TEXT-INDENT:-0.25in;MARGIN:0in 0in 0pt 0.5in;mso-list:l1 level1 lfo1;" class="MsoNoSpacing"&gt;&lt;span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;"&gt;&lt;span style="mso-list:Ignore;"&gt;1.&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Create a new blank form.&lt;/p&gt;
&lt;p style="TEXT-INDENT:-0.25in;MARGIN:0in 0in 0pt 0.5in;mso-list:l1 level1 lfo1;" class="MsoNoSpacing"&gt;&lt;span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;"&gt;&lt;span style="mso-list:Ignore;"&gt;2.&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Add a Receive data connection to the &lt;b style="mso-bidi-font-weight:normal;"&gt;GetUserInfo&lt;/b&gt; method of the Qdabra AD Web Service.&lt;/p&gt;
&lt;p style="TEXT-INDENT:-0.25in;MARGIN:0in 0in 0pt 1in;mso-list:l1 level2 lfo1;" class="MsoNoSpacing"&gt;&lt;span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;"&gt;&lt;span style="mso-list:Ignore;"&gt;a.&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Set it to NOT automatically retrieve data when the form is opened.&lt;/p&gt;&amp;nbsp; 
&lt;p style="MARGIN:0in 0in 10pt;" class="MsoNormal"&gt;Create the schema:&lt;/p&gt;
&lt;p style="TEXT-INDENT:-0.25in;MARGIN:0in 0in 0pt 0.5in;mso-list:l0 level1 lfo3;" class="MsoNoSpacing"&gt;&lt;span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;"&gt;&lt;span style="mso-list:Ignore;"&gt;1.&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;In the Data Source task pane, add the following text fields: &lt;b style="mso-bidi-font-weight:normal;"&gt;Title&lt;/b&gt;, &lt;b style="mso-bidi-font-weight:normal;"&gt;Subtitle&lt;/b&gt;, &lt;b style="mso-bidi-font-weight:normal;"&gt;Author&lt;/b&gt;, &lt;b style="mso-bidi-font-weight:normal;"&gt;Coauthor&lt;/b&gt;, &lt;b style="mso-bidi-font-weight:normal;"&gt;Year&lt;/b&gt;, and &lt;b style="mso-bidi-font-weight:normal;"&gt;Description&lt;/b&gt;.&lt;/p&gt;
&lt;p style="TEXT-INDENT:-0.25in;MARGIN:0in 0in 0pt 0.5in;mso-list:l0 level1 lfo3;" class="MsoNoSpacing"&gt;&lt;span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;"&gt;&lt;span style="mso-list:Ignore;"&gt;2.&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Add the following text and Boolean attributes to &lt;b style="mso-bidi-font-weight:normal;"&gt;Author&lt;/b&gt; and &lt;b style="mso-bidi-font-weight:normal;"&gt;Coauthor &lt;/b&gt;schema nodes: &lt;b style="mso-bidi-font-weight:normal;"&gt;displayName&lt;/b&gt;, &lt;b style="mso-bidi-font-weight:normal;"&gt;isEditing&lt;/b&gt; (default to TRUE).&lt;/p&gt;&amp;nbsp; 
&lt;p style="MARGIN:0in 0in 0pt;" class="MsoNoSpacing"&gt;Design the view:&lt;/p&gt;&amp;nbsp; 
&lt;p style="TEXT-INDENT:-0.25in;MARGIN:0in 0in 0pt 0.5in;mso-list:l2 level1 lfo2;" class="MsoNoSpacing"&gt;&lt;span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;"&gt;&lt;span style="mso-list:Ignore;"&gt;1.&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Drag &lt;b style="mso-bidi-font-weight:normal;"&gt;myFields&lt;/b&gt; into the view and select Controls In Layout Table.&lt;/p&gt;
&lt;p style="TEXT-INDENT:-0.25in;MARGIN:0in 0in 0pt 0.5in;mso-list:l2 level1 lfo2;" class="MsoNoSpacing"&gt;&lt;span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;"&gt;&lt;span style="mso-list:Ignore;"&gt;2.&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Edit the properties for both &lt;b style="mso-bidi-font-weight:normal;"&gt;Author &lt;/b&gt;and&lt;b style="mso-bidi-font-weight:normal;"&gt; Coauthor&lt;/b&gt; fields to:&lt;/p&gt;
&lt;p style="TEXT-INDENT:-0.25in;MARGIN:0in 0in 0pt 1in;mso-list:l2 level2 lfo2;" class="MsoNoSpacing"&gt;&lt;span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;"&gt;&lt;span style="mso-list:Ignore;"&gt;a.&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Add data validation to show the ScreenTip “Invalid Alias” when &lt;b style="mso-bidi-font-weight:normal;"&gt;isEditing&lt;/b&gt; is FALSE and &lt;b style="mso-bidi-font-weight:normal;"&gt;displayName&lt;/b&gt; is blank and respective &lt;b style="mso-bidi-font-weight:normal;"&gt;Author&lt;/b&gt; and &lt;b style="mso-bidi-font-weight:normal;"&gt;Coauthor&lt;/b&gt; is not blank.&lt;/p&gt;
&lt;p style="TEXT-INDENT:-0.25in;MARGIN:0in 0in 0pt 1in;mso-list:l2 level2 lfo2;" class="MsoNoSpacing"&gt;&lt;span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;"&gt;&lt;span style="mso-list:Ignore;"&gt;b.&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Add a rule to set the &lt;b style="mso-bidi-font-weight:normal;"&gt;GetUserInfo&lt;/b&gt; &lt;b style="mso-bidi-font-weight:normal;"&gt;username&lt;/b&gt; query field with the value from &lt;b style="mso-bidi-font-weight:normal;"&gt;Author&lt;/b&gt; and &lt;b style="mso-bidi-font-weight:normal;"&gt;Coauthor&lt;/b&gt; respectively.&lt;/p&gt;
&lt;p style="TEXT-INDENT:-0.25in;MARGIN:0in 0in 0pt 1in;mso-list:l2 level2 lfo2;" class="MsoNoSpacing"&gt;&lt;span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;"&gt;&lt;span style="mso-list:Ignore;"&gt;c.&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Add a rule to query &lt;b style="mso-bidi-font-weight:normal;"&gt;GetUserInfo&lt;/b&gt;.&lt;/p&gt;
&lt;p style="TEXT-INDENT:-0.25in;MARGIN:0in 0in 0pt 1in;mso-list:l2 level2 lfo2;" class="MsoNoSpacing"&gt;&lt;span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;"&gt;&lt;span style="mso-list:Ignore;"&gt;d.&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Add a rule to set &lt;b style="mso-bidi-font-weight:normal;"&gt;displayName&lt;/b&gt; with &lt;b style="mso-bidi-font-weight:normal;"&gt;Value&lt;/b&gt; (from the &lt;b style="mso-bidi-font-weight:normal;"&gt;GetUserInfo&lt;/b&gt; data connection) filtered on &lt;b style="mso-bidi-font-weight:normal;"&gt;Key&lt;/b&gt;=“displayName”.&lt;/p&gt;
&lt;p style="TEXT-INDENT:-0.25in;MARGIN:0in 0in 0pt 1in;mso-list:l2 level2 lfo2;" class="MsoNoSpacing"&gt;&lt;span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;"&gt;&lt;span style="mso-list:Ignore;"&gt;e.&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Add a rule to set &lt;b style="mso-bidi-font-weight:normal;"&gt;isEditing&lt;/b&gt; to “false”.&lt;/p&gt;
&lt;p style="TEXT-INDENT:-0.25in;MARGIN:0in 0in 0pt 1in;mso-list:l2 level2 lfo2;" class="MsoNoSpacing"&gt;&lt;span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;"&gt;&lt;span style="mso-list:Ignore;"&gt;f.&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Add conditional formatting to hide the field when the &lt;b style="mso-bidi-font-weight:normal;"&gt;isEditing&lt;/b&gt; is FALSE and &lt;b style="mso-bidi-font-weight:normal;"&gt;displayName&lt;/b&gt; is not blank.&lt;/p&gt;
&lt;p style="TEXT-INDENT:-0.25in;MARGIN:0in 0in 0pt 0.5in;mso-list:l2 level1 lfo2;" class="MsoNoSpacing"&gt;&lt;span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;"&gt;&lt;span style="mso-list:Ignore;"&gt;3.&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Add buttons below the &lt;b style="mso-bidi-font-weight:normal;"&gt;Author&lt;/b&gt; and &lt;b style="mso-bidi-font-weight:normal;"&gt;Coauthor&lt;/b&gt; fields in the table and edit their properties to:&lt;/p&gt;
&lt;p style="TEXT-INDENT:-0.25in;MARGIN:0in 0in 0pt 1in;mso-list:l2 level2 lfo2;" class="MsoNoSpacing"&gt;&lt;span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;"&gt;&lt;span style="mso-list:Ignore;"&gt;a.&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Set the respective label with the values of the &lt;b style="mso-bidi-font-weight:normal;"&gt;Author/displayName&lt;/b&gt; and &lt;b style="mso-bidi-font-weight:normal;"&gt;Coauthor/displayName&lt;/b&gt;.&lt;/p&gt;
&lt;p style="TEXT-INDENT:-0.25in;MARGIN:0in 0in 0pt 1in;mso-list:l2 level2 lfo2;" class="MsoNoSpacing"&gt;&lt;span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;"&gt;&lt;span style="mso-list:Ignore;"&gt;b.&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Name the respective ID value to &lt;b style="mso-bidi-font-weight:normal;"&gt;btnEditAuthor&lt;/b&gt; and &lt;b style="mso-bidi-font-weight:normal;"&gt;btnEditCoauthor&lt;/b&gt;.&lt;/p&gt;
&lt;p style="TEXT-INDENT:-0.25in;MARGIN:0in 0in 0pt 1in;mso-list:l2 level2 lfo2;" class="MsoNoSpacing"&gt;&lt;span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;"&gt;&lt;span style="mso-list:Ignore;"&gt;c.&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Add a rule to clear the respective &lt;b style="mso-bidi-font-weight:normal;"&gt;Author &lt;/b&gt;and &lt;b style="mso-bidi-font-weight:normal;"&gt;Coauthor &lt;/b&gt;value.&lt;/p&gt;
&lt;p style="TEXT-INDENT:-0.25in;MARGIN:0in 0in 0pt 1in;mso-list:l2 level2 lfo2;" class="MsoNoSpacing"&gt;&lt;span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;"&gt;&lt;span style="mso-list:Ignore;"&gt;d.&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Add a rule to set the respective &lt;b style="mso-bidi-font-weight:normal;"&gt;isEditing&lt;/b&gt; to “true”.&lt;/p&gt;
&lt;p style="TEXT-INDENT:-0.25in;MARGIN:0in 0in 0pt 1in;mso-list:l2 level2 lfo2;" class="MsoNoSpacing"&gt;&lt;span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;"&gt;&lt;span style="mso-list:Ignore;"&gt;e.&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Add conditional formatting to hide the button when the respective &lt;b style="mso-bidi-font-weight:normal;"&gt;isEditing&lt;/b&gt; is TRUE.&lt;/p&gt;
&lt;p style="TEXT-INDENT:-0.25in;MARGIN:0in 0in 0pt 1in;mso-list:l2 level2 lfo2;" class="MsoNoSpacing"&gt;&lt;span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;"&gt;&lt;span style="mso-list:Ignore;"&gt;f.&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Add conditional formatting to hide the button when the respective &lt;b style="mso-bidi-font-weight:normal;"&gt;isEditing&lt;/b&gt; is FALSE and &lt;b style="mso-bidi-font-weight:normal;"&gt;displayName&lt;/b&gt; is blank.&lt;/p&gt;
&lt;p style="TEXT-INDENT:-0.25in;MARGIN:0in 0in 0pt 1in;mso-list:l2 level2 lfo2;" class="MsoNoSpacing"&gt;&lt;span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;"&gt;&lt;span style="mso-list:Ignore;"&gt;g.&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Set the width to 100%.&lt;/p&gt;&amp;nbsp; 
&lt;p style="MARGIN:0in 0in 0pt;" class="MsoNoSpacing"&gt;Preview the form and test. You can apply other formatting to the button as you like, such as removing the border and background shade, and manually left-justifying the text in the expanded view .XSL file.&lt;/p&gt;&amp;nbsp; 
&lt;p style="MARGIN:0in 0in 10pt;" class="MsoNormal"&gt;&lt;/font&gt;&lt;img style="WIDTH:238px;HEIGHT:156px;" src="http://www.infopathdev.com/photos/blog_pictures/images/47770/original.aspx" width="238" height="156" alt="" /&gt;&lt;/p&gt;
&lt;p style="MARGIN:0in 0in 10pt;" class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="MARGIN:0in 0in 10pt;" class="MsoNormal"&gt;You can download the sample form I created for this article from here: &lt;a href="http://www.infopathdev.com/files/folders/examples/entry47771.aspx"&gt;http://www.infopathdev.com/files/folders/examples/entry47771.aspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=47769" width="1" height="1"&gt;</description><category domain="http://www.infopathdev.com/blogs/greg/archive/tags/Rules/default.aspx">Rules</category><category domain="http://www.infopathdev.com/blogs/greg/archive/tags/Data+Validation/default.aspx">Data Validation</category><category domain="http://www.infopathdev.com/blogs/greg/archive/tags/Conditional+Formatting/default.aspx">Conditional Formatting</category><category domain="http://www.infopathdev.com/blogs/greg/archive/tags/Greg+Collins/default.aspx">Greg Collins</category><category domain="http://www.infopathdev.com/blogs/greg/archive/tags/DisplayName/default.aspx">DisplayName</category><category domain="http://www.infopathdev.com/blogs/greg/archive/tags/ADWS/default.aspx">ADWS</category><category domain="http://www.infopathdev.com/blogs/greg/archive/tags/Alias/default.aspx">Alias</category></item><item><title>Debug Managed Code in VSTA -- For the Accidental Programmer</title><link>http://www.infopathdev.com/blogs/hilary/archive/2009/09/27/debug-managed-code-in-vsta-for-the-accidental-programmer.aspx</link><pubDate>Sun, 27 Sep 2009 13:49:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:47371</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Perhaps you are an accidental programmer. You are the person at your organization who was in charge of some laborious business process and you thought &amp;quot;Gee, we have this InfoPath thing. Maybe I can build a little form for this?&amp;quot;. You build the form...and suddenly everyone wants to know if you can do &lt;strong&gt;this&lt;/strong&gt; or if you can do &lt;strong&gt;that&lt;/strong&gt;. You run into a couple of the things that InfoPath doesn&amp;#39;t do out of the box, and you see some code samples hanging around....&lt;/p&gt;
&lt;p&gt;Next thing you know, you&amp;#39;re writing managed code. Or at least copying and pasting managed code and trying to get it to work for your form.&lt;/p&gt;
&lt;p&gt;With InfoPath 2007 came VSTA (Visual Studio Tools for Applications). This can be an incredible boon to the accidental programmer, because you can leverage the rich debugging experience of Visual Studio to find your code issues and errors. If you are trying to adapt someone else&amp;#39;s code sample for your form, or follow a tutuorial that just isn&amp;#39;t working for you, one of the first things you can do is run the project in debug mode.&lt;/p&gt;
&lt;p&gt;For the purposes of this simple sample, I&amp;#39;ve added a loading event to my form.&lt;br /&gt;&lt;img style="WIDTH:516px;HEIGHT:287px;" title="Add Loading Event" alt="Add Loading Event" src="http://www.infopathdev.com/blogs/hilary/Debug/Debug1.png" width="516" height="287" /&gt;&lt;/p&gt;
&lt;p&gt;VSTA opens with the event added:&lt;br /&gt;&lt;img style="WIDTH:533px;HEIGHT:448px;" title="Event in Code Editor" alt="Event in Code Editor" src="http://www.infopathdev.com/blogs/hilary/Debug/Debug2.png" width="533" height="448" /&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve written a little code to set a field&amp;#39;s value:&lt;br /&gt;&lt;img style="WIDTH:804px;HEIGHT:132px;" title="Code Snippet in Editor" alt="Code Snippet in Editor" src="http://www.infopathdev.com/blogs/hilary/Debug/Debug3.png" width="804" height="132" /&gt;&lt;/p&gt;
&lt;p&gt;Now, I&amp;#39;m going to add a breakpoint. Click in the margin of the code editor window by the line you want to stop at, and you&amp;#39;ll see a big burgundy dot in the margin, as well as a highlight on the line:&lt;br /&gt;&lt;img style="WIDTH:767px;HEIGHT:72px;" title="Adding Breakpoint" alt="Adding Breakpoint" src="http://www.infopathdev.com/blogs/hilary/Debug/Debug4.png" width="767" height="72" /&gt;&lt;/p&gt;
&lt;p&gt;We need to run the form from VSTA, so click the toolbar&amp;nbsp;button that looks like an old school tape player&amp;#39;s &lt;strong&gt;Play&lt;/strong&gt; button (also under the &lt;strong&gt;Debug &lt;/strong&gt;menu, &lt;strong&gt;Start Debugging&lt;/strong&gt;):&lt;br /&gt;&lt;img style="WIDTH:260px;HEIGHT:78px;" title="Start in Debug" alt="Start in Debug" src="http://www.infopathdev.com/blogs/hilary/Debug/Debug5.png" width="260" height="78" /&gt;&lt;/p&gt;
&lt;p&gt;When the form hits that line of code, you&amp;#39;ll see it hightlighted:&lt;br /&gt;&lt;img style="WIDTH:767px;HEIGHT:75px;" title="Highlighted Line" alt="Highlighted Line" src="http://www.infopathdev.com/blogs/hilary/Debug/Debug6.png" width="767" height="75" /&gt;&lt;/p&gt;
&lt;p&gt;And now we can have a little fun. Use the &lt;strong&gt;Step Over&lt;/strong&gt; button to go to the next line:&lt;br /&gt;&lt;img style="WIDTH:194px;HEIGHT:83px;" title="Step Over button" alt="Step Over button" src="http://www.infopathdev.com/blogs/hilary/Debug/Debug7.png" width="194" height="83" /&gt;&lt;/p&gt;
&lt;p&gt;And hover your mouse over the variable that you just set to see what value it has. You can also right click the variable and either &lt;strong&gt;Add Watch&lt;/strong&gt; or &lt;strong&gt;Quick Watch &lt;/strong&gt;to see its values:&lt;br /&gt;&lt;img style="WIDTH:657px;HEIGHT:393px;" title="Quick Watch window" alt="Quick Watch window" src="http://www.infopathdev.com/blogs/hilary/Debug/Debug8.png" width="657" height="393" /&gt;&lt;/p&gt;
&lt;p&gt;Let&amp;#39;s see what happens if I have the XPath wrong in my code (a frequent cause of errors -- I&amp;#39;d really have thought that the IP 2007 &lt;strong&gt;Copy XPath&lt;/strong&gt; feature would have prevented those, but we all love our copy / paste too much when it comes to code....):&lt;br /&gt;&lt;img style="WIDTH:298px;HEIGHT:181px;" title="Quick Watch window" alt="Quick Watch window" src="http://www.infopathdev.com/blogs/hilary/Debug/Debug9.png" width="298" height="181" /&gt;&lt;/p&gt;
&lt;p&gt;Not too surprisingly, my XPathNavigator is null, and look what happens when I try to set its value:&lt;br /&gt;&lt;img style="WIDTH:630px;HEIGHT:311px;" title="Error dialog" alt="Error dialog" src="http://www.infopathdev.com/blogs/hilary/Debug/Debug10.png" width="630" height="311" /&gt;&lt;/p&gt;
&lt;p&gt;Everyone&amp;#39;s favorite, the NullReferenceException! But now I at least know the source of my troubles -- that the XPathNavigator I&amp;#39;d created was null. I can focus on the line that is the problem, make adjustments and run my code again.&lt;/p&gt;
&lt;p&gt;Setting breakpoints and walking through your code while it runs will not only&amp;nbsp;help you find and understand errors, it will help you understand just what the code is doing in the first place. If you are an accidental programmer, watching your code run can help you learn the syntax and logic of the code sample you&amp;#39;ve found someplace online, and help you see what you need to do to get that sample to work with your unique form. Happy Debugging!&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=47371" width="1" height="1"&gt;</description></item><item><title>How To Deploy A Form To Multiple SharePoint Libraries</title><link>http://www.infopathdev.com/blogs/jo-anne_alfafara/archive/2009/09/12/how-to-deploy-a-form-to-multiple-sharepoint-libraries.aspx</link><pubDate>Fri, 11 Sep 2009 17:07:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:46885</guid><dc:creator>Jo-Anne Alfafara</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;There are times when you want to deploy a template to multiple SharePoint form libraries. For example, multiple teams may use the same template but need to keep their documents separate. The typical way to do this is to deploy the form twice, once for each library. However, a few problems arise when you do this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;If a user tries to open a form from the other library, they will get the form conflict dialog even though the form is supposed to be the same. &lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;A user who has cached a form from one library cannot view forms from the other library offline. InfoPath thinks they&amp;#39;re different.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;To deploy form updates you have to republish to each library separately.&lt;br /&gt;There is a little known feature whereby you can publish the XSN template to one location and then reference it in multiple SharePoint form libraries. The steps to do this are as follows.&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;DEPLOY A TEMPLATE.XML FILE&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp;Deploy the XSN to your shared location. It can be on the same SharePoint server in a document library (using the deploy to file share publish wizard option) or any file share or web site. &lt;br /&gt;2.&amp;nbsp;Launch the form from that location and immediately save a blank form instance and call it &amp;quot;&lt;strong&gt;template.xml&lt;/strong&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/46873/original.aspx" alt="" /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;3.&amp;nbsp;Next, browse to the first form library where you want to publish the template. In the top right &lt;strong&gt;View&lt;/strong&gt; dropdown, click &lt;strong&gt;Explorer View&lt;/strong&gt;. In SharePoint 2003, you can find this link displayed in the left column.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/46874/original.aspx" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;4.&amp;nbsp;You will see a &lt;strong&gt;Forms&lt;/strong&gt; folder. Double-click that to go there. &lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/46875/original.aspx" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Make sure &lt;strong&gt;Show hidden files and folders&lt;/strong&gt; option is selected in your &lt;strong&gt;Folder Options&lt;/strong&gt;. Otherwise, the folder will not be displayed.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/46876/original.aspx" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;5.&amp;nbsp;Once &lt;strong&gt;Forms&lt;/strong&gt; folder is opened, you will see a file called &lt;strong&gt;template.xsn&lt;/strong&gt;. &lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/46877/original.aspx" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;6.&amp;nbsp;Right-click the template.xsn and delete it.&lt;br /&gt;7.&amp;nbsp;Copy the &lt;strong&gt;template.xml file&lt;/strong&gt; you created earlier into this folder. &lt;br /&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/46878/original.aspx" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;8.&amp;nbsp;Click &lt;strong&gt;Form Library Settings&lt;/strong&gt; in the library toolbar. If you’re using SharePoint 2003, click &lt;strong&gt;Modify Settings and Columns&lt;/strong&gt; in the left column. &lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/46880/original.aspx" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;9.&amp;nbsp;Under &lt;strong&gt;General Settings&lt;/strong&gt;, click &lt;strong&gt;Advanced settings&lt;/strong&gt;. &lt;br /&gt;10.&amp;nbsp;In the &lt;strong&gt;Document Template&lt;/strong&gt; field, rename the &lt;strong&gt;Template URL&lt;/strong&gt; from &lt;strong&gt;template.xsn&lt;/strong&gt; to &lt;strong&gt;template.xml&lt;/strong&gt;. Note you might think you could point directly to the other XSN from here but you can&amp;#39;t because this link can only be a file in this library. &lt;br /&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/46882/original.aspx" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;11.&amp;nbsp;Click &lt;strong&gt;OK&lt;/strong&gt; and you&amp;#39;re done! &lt;br /&gt;12.&amp;nbsp;Now when you click &lt;strong&gt;New&lt;/strong&gt; button in the SharePoint library toolbar it will launch the form that you deployed in the central location. &lt;br /&gt;13.&amp;nbsp;Repeat for other libraries where you want to use the same template.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;DEFAULT CONTENT IN THE TEMPLATE.XML FILE&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;An advanced use of this can also be to have the template.xml file have some prefilled content that you want users to have when launching a new file. At step 2, fill in the default form data and save that locally. You can make a different copy of the template.xml with different default data for each library (only 1 per library). Then upload that file and when the user clicks in the library to create a new form, that default data will be pre-populated.&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=46885" width="1" height="1"&gt;</description></item><item><title>Qdabra Vertical Tabs Template Part</title><link>http://www.infopathdev.com/blogs/mel_balsamo/archive/2009/09/06/vertical-tabs-XSN.aspx</link><pubDate>Sun, 06 Sep 2009 11:53:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:46672</guid><dc:creator>Mel Balsamo</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;This &lt;a href="http://www.infopathdev.com/blogs/mel_balsamo/archive/2009/09/06/create-an-infopath-form-that-switches-views.aspx"&gt;blog post&lt;/a&gt; provides the steps on how to create an InfoPath form that switches views through vertical tabs. When you’ve followed all those steps and have successfully created your own InfoPath form with vertical tabs, you’ll probably use this technique when designing your forms going forward. It’ll be more cool to have a template part that’s readily available from your InfoPath Custom Controls so you can easily add vertical tabs in your forms.&lt;/p&gt;
&lt;p&gt;Qdabra has packaged this template part for you so you can add vertical tabs in your InfoPath solutions anytime, in as many form templates as you want, in a single click!&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/verticaltabs/qdabraxtp/Figure01.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;And not only that!&lt;/p&gt;
&lt;p&gt;We’re aware that template parts don’t inherit the color scheme of its destination form. Instead, your template part section will remain to have the default, not-so-exciting Blue theme, when everything else in your form is gray, or burgundy, purple, or what have you. If you wish to change the vertical tabs’ color scheme to match your entire form’s, you will have to edit the styles in each of your layout tables and controls, or worse, tinker with the XSL files and hand-edit them.&lt;/p&gt;
&lt;p&gt;Qdabra’s Vertical Tabs XTP is designed to acquire color schemes. We’ve done it all for you!&lt;/p&gt;
&lt;p&gt;So if I want the Gray theme:&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/verticaltabs/qdabraxtp/Figure02.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;or Burgundy:&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/verticaltabs/qdabraxtp/Figure03.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;or the Purple Sage theme:&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/verticaltabs/qdabraxtp/Figure04.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;I can pick whichever in a single click.&lt;/p&gt;
&lt;p&gt;Cool, eh?&lt;/p&gt;
&lt;p&gt;The Vertical Tabs package includes the template part (XTP), along with a user guide and a sample InfoPath form template (XSN) to get you started. Click &lt;a href="http://www.qdabra.com/proddetail.asp?prod=VerticalTabsXTP"&gt;here&lt;/a&gt; to purchase the package.&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=46672" width="1" height="1"&gt;</description><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/template+part/default.aspx">template part</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/XTP/default.aspx">XTP</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/Qdabra+Vertical+Tabs+XTP/default.aspx">Qdabra Vertical Tabs XTP</category></item><item><title>Create an InfoPath form that switches views</title><link>http://www.infopathdev.com/blogs/mel_balsamo/archive/2009/09/06/create-an-infopath-form-that-switches-views.aspx</link><pubDate>Sun, 06 Sep 2009 08:27:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:46669</guid><dc:creator>Mel Balsamo</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;We’ve seen InfoPath forms that have tabs on top, lined up horizontally. These tabs are actually buttons that are meant for switching to different views within the form.&lt;/p&gt;
&lt;p&gt;This &lt;a href="http://blogs.msdn.com/infopath/archive/2006/05/01/tabs.aspx"&gt;blog post&lt;/a&gt; describes how this is done:&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/verticaltabs/howto/Figure01.jpg" width="427" height="190" /&gt;&lt;/p&gt;
&lt;p&gt;For a change, why don’t we have these tabs lined up vertically instead, like this:&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/verticaltabs/howto/Figure02.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;Nice?&lt;/p&gt;
&lt;p&gt;Follow the steps below to find out how this is done.&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;1. Design a new, blank InfoPath form template.&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;2. Insert a table with at least 6 columns and 1 row.&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;3. Merge the first 5 columns:&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/verticaltabs/howto/Figure03.jpg" /&gt;&lt;/p&gt;
&lt;p style="PADDING-LEFT:60px;"&gt;The left column will hold your form template’s fields and controls, while the right is where your vertical tabs will go.&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;4. Insert at least 4 buttons in the right column, labelling each as &lt;strong&gt;Tab 1&lt;/strong&gt;, &lt;strong&gt;Tab 2&lt;/strong&gt;, &lt;strong&gt;Tab 3&lt;/strong&gt; and &lt;strong&gt;Tab 4&lt;/strong&gt;, and with IDs &lt;strong&gt;tabOne&lt;/strong&gt;, &lt;strong&gt;tabTwo&lt;/strong&gt;, &lt;strong&gt;tabThree&lt;/strong&gt; and &lt;strong&gt;tabFour&lt;/strong&gt;, respectively.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/verticaltabs/howto/Figure04.jpg" /&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/verticaltabs/howto/Figure05.jpg" /&gt;&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;5. Right-click on the cell where the buttons are &amp;gt; &lt;strong&gt;Table&lt;/strong&gt; &lt;strong&gt;Properties&lt;/strong&gt; &amp;gt; &lt;strong&gt;Cell&lt;/strong&gt; and make all paddings &lt;em&gt;0px&lt;/em&gt;:&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/verticaltabs/howto/Figure06.jpg" /&gt;&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;6. Add three more views in your form template named &lt;strong&gt;View&lt;/strong&gt; &lt;strong&gt;2&lt;/strong&gt;, &lt;strong&gt;View&lt;/strong&gt; &lt;strong&gt;3&lt;/strong&gt; and &lt;strong&gt;View&lt;/strong&gt; &lt;strong&gt;4&lt;/strong&gt;:&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img style="BORDER-BOTTOM:#7799c7 1px solid;BORDER-LEFT:#7799c7 1px solid;BORDER-TOP:#7799c7 1px solid;BORDER-RIGHT:#7799c7 1px solid;" alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/verticaltabs/howto/Figure07.jpg" /&gt;&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;7. Save your form template as source files:&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img style="BORDER-BOTTOM:#7799c7 1px solid;BORDER-LEFT:#7799c7 1px solid;BORDER-TOP:#7799c7 1px solid;BORDER-RIGHT:#7799c7 1px solid;" alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/verticaltabs/howto/Figure08.jpg" /&gt;&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;8. Close InfoPath.&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;9. Modify the .xsl files&lt;/p&gt;
&lt;p style="PADDING-LEFT:60px;"&gt;a. In the directory where you saved your source files, open all the .xsl files in any text editor such as Notepad.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img style="BORDER-BOTTOM:#7799c7 1px solid;BORDER-LEFT:#7799c7 1px solid;BORDER-TOP:#7799c7 1px solid;BORDER-RIGHT:#7799c7 1px solid;" alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/verticaltabs/howto/Figure09.jpg" /&gt;&lt;/p&gt;
&lt;p style="PADDING-LEFT:60px;"&gt;b. In &lt;strong&gt;view1.xsl&lt;/strong&gt;, search for “&lt;em&gt;&lt;strong&gt;&amp;lt;body&lt;/strong&gt; &lt;strong&gt;style&lt;/strong&gt;&lt;/em&gt;”&lt;/p&gt;
&lt;p style="PADDING-LEFT:90px;"&gt;&amp;nbsp;&lt;img style="BORDER-BOTTOM:#7799c7 1px solid;BORDER-LEFT:#7799c7 1px solid;BORDER-TOP:#7799c7 1px solid;BORDER-RIGHT:#7799c7 1px solid;" alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/verticaltabs/howto/Figure10.jpg" /&gt;&lt;/p&gt;
&lt;p style="PADDING-LEFT:90px;"&gt;The section above represents the entire content of your first view which we will copy onto our other views so that they’d all look similar.&lt;/p&gt;
&lt;p style="PADDING-LEFT:60px;"&gt;c. In &lt;strong&gt;view1.xsl&lt;/strong&gt;, copy the entire section shown above and paste it onto the other three views replacing this part:&lt;/p&gt;
&lt;p style="PADDING-LEFT:90px;"&gt;&amp;nbsp;&lt;img style="BORDER-BOTTOM:#7799c7 1px solid;BORDER-LEFT:#7799c7 1px solid;BORDER-TOP:#7799c7 1px solid;BORDER-RIGHT:#7799c7 1px solid;" alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/verticaltabs/howto/Figure11.jpg" /&gt;&lt;/p&gt;
&lt;p style="PADDING-LEFT:60px;"&gt;d. This section represents your vertical tabs/buttons:&lt;/p&gt;
&lt;p style="PADDING-LEFT:90px;"&gt;&amp;nbsp;&lt;img style="BORDER-BOTTOM:#7799c7 1px solid;BORDER-LEFT:#7799c7 1px solid;BORDER-TOP:#7799c7 1px solid;BORDER-RIGHT:#7799c7 1px solid;" alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/verticaltabs/howto/Figure12.jpg" /&gt;&lt;/p&gt;
&lt;p style="PADDING-LEFT:90px;"&gt;Note that for each view, we will have a different style for the button corresponding to that view, i.e. the “active” view. For example, the first view (View 1) will have the first button (Tab 1) as the active view button, while the rest will have non-active view buttons.&lt;/p&gt;
&lt;p style="PADDING-LEFT:90px;"&gt;For your active view, insert the following for the active button:&lt;/p&gt;
&lt;p style="PADDING-LEFT:120px;"&gt;style=&amp;quot;BORDER-RIGHT: #000000 1pt solid; PADDING-RIGHT: 10px; BORDER-TOP: #000000 1pt solid; FONT-WEIGHT: bold; PADDING-BOTTOM: 7px; MARGIN: 4px 0px 0px; BORDER-LEFT: #1e3c7b 2.25pt solid; WIDTH: 100%; COLOR: #ffffff; PADDING-TOP: 7px; BORDER-BOTTOM: #000000 1pt solid; BACKGROUND-COLOR: #517dbf; TEXT-ALIGN: right&amp;quot;&lt;/p&gt;
&lt;p style="PADDING-LEFT:90px;"&gt;And for the non-active ones, insert the following:&lt;/p&gt;
&lt;p style="PADDING-LEFT:120px;"&gt;style=&amp;quot;BORDER-RIGHT: #000000 1pt solid; BORDER-TOP: #000000 1pt solid; PADDING-LEFT: 7px; PADDING-BOTTOM: 3px; MARGIN: 4px 10px 0px 0px; BORDER-LEFT: #c0c0c0 2.25pt solid; WIDTH: 100%; COLOR: #517dbf; PADDING-TOP: 3px; BORDER-BOTTOM: #000000 1pt solid; BACKGROUND-COLOR: #ebf0f9; TEXT-ALIGN: left&amp;quot;&lt;/p&gt;
&lt;p style="PADDING-LEFT:90px;"&gt;You will then have the following for &lt;strong&gt;view1.xsl&lt;/strong&gt;:&lt;/p&gt;
&lt;p style="PADDING-LEFT:90px;"&gt;&amp;nbsp;&lt;img style="BORDER-BOTTOM:#7799c7 1px solid;BORDER-LEFT:#7799c7 1px solid;BORDER-TOP:#7799c7 1px solid;BORDER-RIGHT:#7799c7 1px solid;" alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/verticaltabs/howto/Figure13.jpg" /&gt;&lt;/p&gt;
&lt;p style="PADDING-LEFT:60px;"&gt;e. Repeat the same process for the remaining views (.xsl files), inserting the active style tags for the corresponding view, and the non-active ones for the others.&lt;/p&gt;
&lt;p style="PADDING-LEFT:60px;"&gt;f. When done, save all your .xsl files.&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;10. Right-click on &lt;strong&gt;manifest.xsf&lt;/strong&gt; and click &lt;strong&gt;Design&lt;/strong&gt; to see the results in InfoPath design mode.&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img style="BORDER-BOTTOM:#7799c7 1px solid;BORDER-LEFT:#7799c7 1px solid;BORDER-TOP:#7799c7 1px solid;BORDER-RIGHT:#7799c7 1px solid;" alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/verticaltabs/howto/Figure14.jpg" /&gt;&lt;/p&gt;
&lt;p style="PADDING-LEFT:30px;"&gt;11. In all the views, add rules to all the buttons (except for the button corresponding to the current view) that switches to the other views:&lt;/p&gt;
&lt;p style="PADDING-LEFT:60px;"&gt;a. &lt;strong&gt;View 1&lt;/strong&gt;:&lt;/p&gt;
&lt;p style="PADDING-LEFT:90px;"&gt;i. Double-click on the &lt;strong&gt;Tab 2&lt;/strong&gt; button to open its properties, click &lt;strong&gt;Rules&lt;/strong&gt; &amp;gt; &lt;strong&gt;Add&lt;/strong&gt; &amp;gt; &lt;strong&gt;Add&lt;/strong&gt; &lt;strong&gt;Action&lt;/strong&gt; &amp;gt; &lt;strong&gt;Switch&lt;/strong&gt; &lt;strong&gt;View&lt;/strong&gt; &amp;gt; &lt;strong&gt;View&lt;/strong&gt; &lt;strong&gt;2&lt;/strong&gt;.&lt;/p&gt;
&lt;p style="PADDING-LEFT:90px;"&gt;ii. Double-click on the &lt;strong&gt;Tab 3&lt;/strong&gt; button to open its properties, click &lt;strong&gt;Rules&lt;/strong&gt; &amp;gt; &lt;strong&gt;Add&lt;/strong&gt; &amp;gt; &lt;strong&gt;Add&lt;/strong&gt; &lt;strong&gt;Action&lt;/strong&gt; &amp;gt; &lt;strong&gt;Switch&lt;/strong&gt; &lt;strong&gt;View&lt;/strong&gt; &amp;gt; &lt;strong&gt;View&lt;/strong&gt; &lt;strong&gt;3&lt;/strong&gt;.&lt;/p&gt;
&lt;p style="PADDING-LEFT:90px;"&gt;iii. Double-click on the &lt;strong&gt;Tab 4&lt;/strong&gt; button to open its properties, click &lt;strong&gt;Rules&lt;/strong&gt; &amp;gt; Add &amp;gt; &lt;strong&gt;Add&lt;/strong&gt; &lt;strong&gt;Action&lt;/strong&gt; &amp;gt; &lt;strong&gt;Switch&lt;/strong&gt; &lt;strong&gt;View&lt;/strong&gt; &amp;gt; &lt;strong&gt;View&lt;/strong&gt; &lt;strong&gt;4&lt;/strong&gt;.&lt;/p&gt;
&lt;p style="PADDING-LEFT:60px;"&gt;b. &lt;strong&gt;View 2&lt;/strong&gt;:&lt;/p&gt;
&lt;p style="PADDING-LEFT:90px;"&gt;i. Double-click on the &lt;strong&gt;Tab 1&lt;/strong&gt; button to open its properties, click &lt;strong&gt;Rules&lt;/strong&gt; &amp;gt; &lt;strong&gt;Add&lt;/strong&gt; &amp;gt; &lt;strong&gt;Add&lt;/strong&gt; &lt;strong&gt;Action&lt;/strong&gt; &amp;gt; &lt;strong&gt;Switch&lt;/strong&gt; &lt;strong&gt;View&lt;/strong&gt; &amp;gt; &lt;strong&gt;View 1&lt;/strong&gt;.&lt;/p&gt;
&lt;p style="PADDING-LEFT:90px;"&gt;ii. Double-click on the &lt;strong&gt;Tab 3 &lt;/strong&gt;button to open its properties, click &lt;strong&gt;Rules&lt;/strong&gt; &amp;gt; &lt;strong&gt;Add&lt;/strong&gt; &amp;gt; &lt;strong&gt;Add&lt;/strong&gt; &lt;strong&gt;Action&lt;/strong&gt; &amp;gt; &lt;strong&gt;Switch&lt;/strong&gt; &lt;strong&gt;View&lt;/strong&gt; &amp;gt; &lt;strong&gt;View 3&lt;/strong&gt;.&lt;/p&gt;
&lt;p style="PADDING-LEFT:90px;"&gt;iii. Double-click on the &lt;strong&gt;Tab 4&lt;/strong&gt; button to open its properties, click &lt;strong&gt;Rules&lt;/strong&gt; &amp;gt; &lt;strong&gt;Add&lt;/strong&gt; &amp;gt; &lt;strong&gt;Add&lt;/strong&gt; &lt;strong&gt;Action&lt;/strong&gt; &amp;gt; &lt;strong&gt;Switch&lt;/strong&gt; &lt;strong&gt;View&lt;/strong&gt; &amp;gt; &lt;strong&gt;View 4&lt;/strong&gt;.&lt;/p&gt;
&lt;p style="PADDING-LEFT:60px;"&gt;c. &lt;strong&gt;View 3&lt;/strong&gt;:&lt;/p&gt;
&lt;p style="PADDING-LEFT:90px;"&gt;i. Double-click on the &lt;strong&gt;Tab 1&lt;/strong&gt; button to open its properties, click &lt;strong&gt;Rules&lt;/strong&gt; &amp;gt; &lt;strong&gt;Add&lt;/strong&gt; &amp;gt; &lt;strong&gt;Add&lt;/strong&gt; &lt;strong&gt;Action&lt;/strong&gt; &amp;gt; &lt;strong&gt;Switch&lt;/strong&gt; &lt;strong&gt;View&lt;/strong&gt; &amp;gt; &lt;strong&gt;View 1&lt;/strong&gt;.&lt;/p&gt;
&lt;p style="PADDING-LEFT:90px;"&gt;ii. Double-click on the &lt;strong&gt;Tab 2&lt;/strong&gt; button to open its properties, click &lt;strong&gt;Rules&lt;/strong&gt; &amp;gt; &lt;strong&gt;Add&lt;/strong&gt; &amp;gt; &lt;strong&gt;Add&lt;/strong&gt; &lt;strong&gt;Action&lt;/strong&gt; &amp;gt; &lt;strong&gt;Switch&lt;/strong&gt; &lt;strong&gt;View&lt;/strong&gt; &amp;gt; &lt;strong&gt;View&lt;/strong&gt; &lt;strong&gt;2&lt;/strong&gt;.&lt;/p&gt;
&lt;p style="PADDING-LEFT:90px;"&gt;iii. Double-click on the &lt;strong&gt;Tab 4&lt;/strong&gt; button to open its properties, click &lt;strong&gt;Rules&lt;/strong&gt; &amp;gt; &lt;strong&gt;Add&lt;/strong&gt; &amp;gt; &lt;strong&gt;Add&lt;/strong&gt; &lt;strong&gt;Action&lt;/strong&gt; &amp;gt; &lt;strong&gt;Switch&lt;/strong&gt; &lt;strong&gt;View&lt;/strong&gt; &amp;gt; &lt;strong&gt;View 4&lt;/strong&gt;.&lt;/p&gt;
&lt;p style="PADDING-LEFT:60px;"&gt;d. &lt;strong&gt;View 4&lt;/strong&gt;:&lt;/p&gt;
&lt;p style="PADDING-LEFT:90px;"&gt;i. Double-click on the &lt;strong&gt;Tab 1&lt;/strong&gt; button to open its properties, click &lt;strong&gt;Rules&lt;/strong&gt; &amp;gt; &lt;strong&gt;Add&lt;/strong&gt; &amp;gt; &lt;strong&gt;Add&lt;/strong&gt; &lt;strong&gt;Action&lt;/strong&gt; &amp;gt; &lt;strong&gt;Switch&lt;/strong&gt; &lt;strong&gt;View&lt;/strong&gt; &amp;gt; &lt;strong&gt;View 1&lt;/strong&gt;.&lt;/p&gt;
&lt;p style="PADDING-LEFT:90px;"&gt;ii. Double-click on the &lt;strong&gt;Tab 2&lt;/strong&gt; button to open its properties, click &lt;strong&gt;Rules&lt;/strong&gt; &amp;gt; &lt;strong&gt;Add&lt;/strong&gt; &amp;gt; &lt;strong&gt;Add&lt;/strong&gt; &lt;strong&gt;Action&lt;/strong&gt; &amp;gt; &lt;strong&gt;Switch&lt;/strong&gt; &lt;strong&gt;View&lt;/strong&gt; &amp;gt; &lt;strong&gt;View&lt;/strong&gt; &lt;strong&gt;2&lt;/strong&gt;.&lt;/p&gt;
&lt;p style="PADDING-LEFT:90px;"&gt;iii. Double-click on the &lt;strong&gt;Tab 3&lt;/strong&gt; button to open its properties, click &lt;strong&gt;Rules&lt;/strong&gt; &amp;gt; &lt;strong&gt;Add&lt;/strong&gt; &amp;gt; &lt;strong&gt;Add&lt;/strong&gt; &lt;strong&gt;Action&lt;/strong&gt; &amp;gt; &lt;strong&gt;Switch&lt;/strong&gt; &lt;strong&gt;View&lt;/strong&gt; &amp;gt; &lt;strong&gt;View 3&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;You can now design your views according to your needs. Add your titles, fields/controls, borders and shading, etc…&lt;/p&gt;
&lt;p style="TEXT-ALIGN:center;"&gt;&lt;img alt="" src="http://www.infopathdev.com/blogs/mel_balsamo/images/templateparts/verticaltabs/howto/Figure15.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;There’s your vertical tabbing!&lt;/p&gt;
&lt;p&gt;When you’ve done all the steps in this blog and have successfully created your own InfoPath form with vertical tabs, you’ll probably use this technique when designing your forms going forward. It’ll be more cool to have a template part that’s readily available from your InfoPath Custom Controls so you can add vertical tabs in your forms in one click! Click &lt;a href="http://www.infopathdev.com/blogs/mel_balsamo/archive/2009/09/06/qdabra-vertical-tabs-template-part.aspx"&gt;here&lt;/a&gt; to learn more.&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=46669" width="1" height="1"&gt;</description><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/template+part/default.aspx">template part</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/InfoPath/default.aspx">InfoPath</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/Vertical+tabs/default.aspx">Vertical tabs</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/tabbing/default.aspx">tabbing</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/buttons/default.aspx">buttons</category></item><item><title>SQL: A workaround for “Cannot generate SSPI context” when using DBXL</title><link>http://www.infopathdev.com/blogs/dan_balsamo/archive/2009/08/24/sql-a-workaround-for-cannot-generate-sspi-context-when-using-dbxl.aspx</link><pubDate>Mon, 24 Aug 2009 19:59:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:46180</guid><dc:creator>dan.balsamo</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;font face="Calibri" size="3"&gt;When working with DBXL and other
applications, you need SQL. Some organizations deal with multiple SQL
instances and this can create a problem if some SQL instances are on
different domains. When we attempt to connect an SQL instance using SQL
Server Management Studio, we might encounter an error that reads: &lt;/font&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;‘Cannot generate SSPI context’.&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;Here’s a workaround if you find yourself in a similar situation:&lt;/span&gt; 
&lt;/p&gt;&lt;p class="MsoListParagraph" style="margin:0in 0in 10pt 0.5in;text-indent:-0.25in;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="margin:0in 0in 10pt 0.5in;text-indent:-0.25in;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&lt;span&gt;1.&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;;font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri" size="3"&gt;Launch command prompt (cmd).&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="margin:0in 0in 10pt 0.5in;text-indent:-0.25in;"&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp; &lt;img src="http://www.infopathdev.com/blogs/dan_balsamo/SQLerror/SQL1.bmp" width="599" height="151" alt="" /&gt;&lt;br /&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="margin:0in 0in 10pt 0.5in;text-indent:-0.25in;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&lt;span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;;font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-size-adjust:none;font-stretch:normal;"&gt;&lt;font face="Arial" size="2"&gt;2. &lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri" size="3"&gt;Use “runas” to launch SQL Server Management Studio. &lt;/font&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;Specifying the &lt;b&gt;userdomain&lt;/b&gt;\&lt;b&gt;useralias&lt;/b&gt; of the account user.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&amp;nbsp; &lt;img src="http://www.infopathdev.com/blogs/dan_balsamo/SQLerror/SQL2.bmp" style="width:629px;height:130px;" alt="" /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; For SQL Server 2008 Management Studio, the command will be similar to this:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; runas /netonly /user:userdomain\useralias
&amp;quot;C:\Program Files\Microsoft SQL
Server\&lt;span style="font-weight:bold;"&gt;100&lt;/span&gt;\Tools\Binn\VSShell\Common7\IDE\&lt;span style="font-weight:bold;"&gt;Ssms.exe&lt;/span&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; For Microsoft SQL Server Management Studio 2005, you’ll use this:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; runas
/netonly /user:userdomain\useralias &amp;quot;C:\Program Files\Microsoft SQL
Server\&lt;span style="font-weight:bold;"&gt;90&lt;/span&gt;\Tools\Binn\VSShell\Common7\IDE\&lt;span style="font-weight:bold;"&gt;Ssms.exe&lt;/span&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;span style="font-weight:bold;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight:bold;"&gt;Note&lt;/span&gt;: This should work on Vista, Windows 7 and Windows Server 2008, but has not been tested with 2003 or XP.&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=46180" width="1" height="1"&gt;</description></item><item><title>Identify InfoPath Version Build for Support</title><link>http://www.infopathdev.com/blogs/dan_balsamo/archive/2009/08/10/identify-infopath-version-build-for-support.aspx</link><pubDate>Mon, 10 Aug 2009 20:56:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:45724</guid><dc:creator>dan.balsamo</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;When helping users with problems we have found it dangerous to make assumptions about the version of InfoPath that is installed.&lt;/p&gt;&lt;p&gt;The user must first identify the version build number of his/her InfoPath:&lt;/p&gt;&lt;p&gt;1. Click &lt;span style="font-weight:bold;"&gt;Start&lt;/span&gt;, and then click &lt;span style="font-weight:bold;"&gt;Control Panel&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;2. In &lt;span style="font-weight:bold;"&gt;Control Panel&lt;/span&gt;, click &lt;span style="font-weight:bold;"&gt;Add or Remove Programs.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;3. In &lt;span style="font-weight:bold;"&gt;Add or Remove Programs&lt;/span&gt;, locate and then click the appropriate Office edition or individual product.&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/blogs/dan_balsamo/InfoPath%20Version%20Build/Blogpic041109c.bmp" alt="" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;4.
Click the resulting &lt;b&gt;Click here for support information&lt;/b&gt; link. A message
box displays the correct version information for the product as it is
recorded by the Microsoft Windows Installer.&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/blogs/dan_balsamo/InfoPath%20Version%20Build/Blogpic041109b.bmp" width="295" height="202" alt="" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here are the Version Builds by year released:&amp;nbsp; &lt;br /&gt;&lt;/p&gt;&lt;p&gt;InfoPath 2003 - 11.0.5531.5606&lt;br /&gt;InfoPath 2003 SP1 - 11.0.6357.6360&lt;br /&gt;InfoPath 2003 SP2 - 11.6565.6568&lt;br /&gt;InfoPath 2003 SP3 - 11.0.8173.0&lt;br /&gt;&lt;br /&gt;InfoPath 2007 - 12.0.6028.5000&lt;br /&gt;InfoPath 2007 SP1 - 12.0.6214.1000 &lt;br /&gt;InfoPath 2007 SP2 - 12.0.6425.1000&lt;br /&gt;&lt;br /&gt;InfoPath 2010 - 14.0.4006.1010 &lt;br /&gt;&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=45724" width="1" height="1"&gt;</description></item><item><title>A mutually exclusive radio button in a repeating section</title><link>http://www.infopathdev.com/blogs/jimmy/archive/2009/08/05/a-mutually-exclusive-radio-button-in-a-repeating-section.aspx</link><pubDate>Wed, 05 Aug 2009 01:51:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:45419</guid><dc:creator>Jimmy</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Here&amp;#39;s a nifty trick you can use when you want to add a radio button or checkbox to a repeating section or table that can only be checked in one row of the section or table at any given time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Scenario&lt;br /&gt;&lt;/strong&gt;You are creating a form for a team roster for teams in a sports tournament.&amp;nbsp; As a rule, each team may only designate one team captain and one vice-captain.&amp;nbsp; You could enforce this using custom validation, but let&amp;#39;s see if we can&amp;#39;t do something a bit fancier.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Creating the form&lt;br /&gt;&lt;/strong&gt;We begin by dragging an empty repeating section into the form:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/blogs/jimmy/exclusiveCheck/emptyRepeating.JPG" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;By default, this section will be created as &lt;strong&gt;my:group2&lt;/strong&gt;.&lt;br /&gt;We then add the fields that we want below &lt;strong&gt;my:group2&lt;/strong&gt;.&amp;nbsp; We create a &lt;strong&gt;my:name&lt;/strong&gt; field to store each team member&amp;#39;s name (this will not serve a real purpose in this demo, but let&amp;#39;s include it for good measure), a &lt;strong&gt;my:captain&lt;/strong&gt; field and a &lt;strong&gt;my:vice-captain&lt;/strong&gt; field (let&amp;#39;s create both of these fields as Boolean (true/false) fields.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/blogs/jimmy/exclusiveCheck/dataSource.JPG" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Then we drag the fields into the repeating section from the taskpane.&amp;nbsp; First we drag the name field in and create it as a text box.&amp;nbsp; Then we drag the &lt;strong&gt;captain&lt;/strong&gt; field &lt;strong&gt;&lt;em&gt;with the right mouse button&lt;/em&gt;&lt;/strong&gt; and create it as a checkbox, and drag the &lt;strong&gt;vice-captain&lt;/strong&gt; field with the right mouse button and create it as a radio (option) button.&amp;nbsp; (Ordinarily you would probably just use one or the other, but for the sake of demonstration we&amp;#39;ll use one of each this time.&lt;br /&gt;Creating the radio button should create a checked and unchecked radio button with the words Yes and No next to them.&amp;nbsp; Delete the No radio button and change the &amp;quot;Yes&amp;quot; text to &amp;quot;Vice-captain.&amp;quot;&lt;/p&gt;
&lt;p&gt;The final result should look like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/blogs/jimmy/exclusiveCheck/fullLayout.JPG" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Adding rules&lt;br /&gt;&lt;/strong&gt;Now that everything&amp;#39;s laid out, it&amp;#39;s time to add rules to make the fields mutually exclusive.&amp;nbsp; Right-click the checkbox (the captain field)&amp;nbsp;and select Rules... top open up the Rules dialog box, and then click Add... to add a new rule, and name it &amp;quot;Clear other captains&amp;quot;.&lt;br /&gt;Click Set condition... to create a condition and set the condition to be &lt;em&gt;&lt;strong&gt;captain&lt;/strong&gt; is equal to TRUE.&lt;/em&gt; That is, whenever a user clicks this checkbox to designate a team member as the captain, we want the rule to clear all of the other &lt;strong&gt;captain&lt;/strong&gt; fields.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/jimmy/exclusiveCheck/whenTrue.JPG" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Now add the rule action.&amp;nbsp; Make the action &amp;quot;Set a field&amp;#39;s value.&amp;quot;&amp;nbsp; Select the &lt;strong&gt;captain&lt;/strong&gt; field itself as the field to set, and for the value, just type &lt;strong&gt;false&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/blogs/jimmy/exclusiveCheck/clearRule.JPG" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Please repeat this process for the vice-captain field, replacing &lt;strong&gt;captain&lt;/strong&gt; with &lt;strong&gt;vice-captain&lt;/strong&gt; in the instructions above.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Not done yet&lt;/strong&gt;&lt;br /&gt;If you preview the form at this point, you will find that you are unable to check any of the checkboxes or radio buttons. This is to be expected.&amp;nbsp; As soon as you try to set a value to TRUE, the rule is setting all of the nodes of that field to false, &lt;em&gt;including the field you just checked&lt;/em&gt;.&amp;nbsp; To get around this, we&amp;#39;ll need to employ a little trick that Hilary Stoupa blogged &lt;a href="http://www.infopathdev.com/blogs/42575.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Editing the manifest&lt;/strong&gt;&lt;br /&gt;Save the form as its source files, close InfoPath and locate the place where you saved the files.&amp;nbsp; Open the manifest.xsf file in a text editor of your choice.&lt;/p&gt;
&lt;p&gt;In the xsf:ruleSets section, you should find the definitions for your rules:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/blogs/jimmy/exclusiveCheck/rulesBeforeEdit.JPG" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;For the first rule, edit the targetField attribute to have the value:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;(../preceding-sibling::my:group2 | ../following-sibling::my:group2)/my:captain&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;This will tell InfoPath to set the &amp;quot;false&amp;quot; value to the my:captain field in all preceding and following repeating nodes.&lt;/p&gt;
&lt;p&gt;Now do the same for the vice-captain rule, replacing my:captain with my:vice-captain.&lt;/p&gt;
&lt;p&gt;Save the manifest.xsf file, right-click it in Internet Explorer and click Design to open it up in Design mode again.&lt;/p&gt;
&lt;p&gt;Now preview the form.&amp;nbsp; If you&amp;#39;ve done everything right up to this point, you should find that any time you click a captain checkbox, all of the other captain checkboxes become cleared, and the same happens for the vice-captain radio buttons.&lt;/p&gt;
&lt;p&gt;&lt;img style="WIDTH:518px;HEIGHT:307px;" src="http://www.infopathdev.com/blogs/jimmy/exclusiveCheck/allDone.JPG" width="518" height="307" alt="" /&gt;&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=45419" width="1" height="1"&gt;</description></item><item><title>Repeating fields: Copy individual nodes using qRules</title><link>http://www.infopathdev.com/blogs/ernesto/archive/2009/08/04/repeating-fields-copy-individual-nodes-using-qrules.aspx</link><pubDate>Tue, 04 Aug 2009 11:01:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:45380</guid><dc:creator>ErnestoM</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Using qRules you can use the commands &lt;span style="font-weight:bold;"&gt;CopyTable &lt;/span&gt;and &lt;span style="font-weight:bold;"&gt;MoveTable &lt;/span&gt;to copy or move an entire table.&lt;/p&gt;&lt;p&gt;But what about copying individual repeating fields? We can do this by using &lt;span style="font-weight:bold;"&gt;Insert &lt;/span&gt;and a couple of InfoPath tricks. The steps below illustrate a simple example from which you can extrapolate others.&lt;/p&gt;&lt;p&gt;First we need to design our form.&lt;/p&gt;&lt;p&gt;1.&amp;nbsp;&amp;nbsp; &amp;nbsp;Create a new, blank InfoPath form and inject it with qRules v1.7.&lt;/p&gt;&lt;p&gt;2.&amp;nbsp;&amp;nbsp; &amp;nbsp;Create a data source as seen in the screenshot below.&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/45371/original.aspx" alt="" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;3.&amp;nbsp;&amp;nbsp; &amp;nbsp;Go to &lt;span style="font-weight:bold;"&gt;Tools &lt;/span&gt;&amp;gt; &lt;span style="font-weight:bold;"&gt;Data Connections&lt;/span&gt; and create a new data connection that retrieves data from an xml file every time the form is opened. Here is a screenshot of my xml file.&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/45372/original.aspx" alt="" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Your secondary data source will look like this:&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/45373/original.aspx" alt="" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;4.&amp;nbsp;&amp;nbsp; &amp;nbsp;Right-click on the repeating node called &lt;span style="font-weight:bold;"&gt;name &lt;/span&gt;and select Repeating table to insert it into the view.&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/45374/original.aspx" alt="" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;5.&amp;nbsp;&amp;nbsp; &amp;nbsp;Next to each the text field, insert a button. Double-click on it and change its Label to “Copy over”.&lt;/p&gt;&lt;p&gt;6.&amp;nbsp;&amp;nbsp; &amp;nbsp;Right-click on the repeating node in the main data source and select Repeating table to insert it into the view.&lt;/p&gt;&lt;p&gt;By now, your view looks like this:&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/45375/original.aspx" alt="" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;We don’t want the destination table to have any rows when the form loads.&lt;/p&gt;&lt;p&gt;7.&amp;nbsp;&amp;nbsp; &amp;nbsp;Click on &lt;span style="font-weight:bold;"&gt;Tools &lt;/span&gt;&amp;gt; &lt;span style="font-weight:bold;"&gt;Default Values&lt;/span&gt;, uncheck the repeating field in the main data source, and click &lt;span style="font-weight:bold;"&gt;OK&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/45376/original.aspx" alt="" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Now we need to configure our rules.&lt;/p&gt;&lt;p&gt;8.&amp;nbsp;&amp;nbsp; &amp;nbsp;Double-click on the button and click &lt;span style="font-weight:bold;"&gt;Rules&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;9.&amp;nbsp;&amp;nbsp; &amp;nbsp;Click &lt;span style="font-weight:bold;"&gt;Add&lt;/span&gt;, then click &lt;span style="font-weight:bold;"&gt;Add Action&lt;/span&gt;. &lt;/p&gt;&lt;p&gt;10.&amp;nbsp;&amp;nbsp; &amp;nbsp;Select &lt;span style="font-weight:bold;"&gt;Set a field’s value&lt;/span&gt; from the &lt;span style="font-weight:bold;"&gt;Actions &lt;/span&gt;dropdown.&lt;/p&gt;&lt;p&gt;11.&amp;nbsp;&amp;nbsp; &amp;nbsp;Click on the icon next to &lt;span style="font-weight:bold;"&gt;Field &lt;/span&gt;and select the &lt;span style="font-weight:bold;"&gt;Command &lt;/span&gt;node in the QdabraRules secondary data connection.&lt;/p&gt;&lt;p&gt;12.&amp;nbsp;&amp;nbsp; &amp;nbsp;For &lt;span style="font-weight:bold;"&gt;Value&lt;/span&gt;, enter the command we will execute: &lt;span style="font-weight:bold;"&gt;Insert /parent=/my:myFields /child=/my:field1 /count=1&lt;/span&gt;. Click &lt;span style="font-weight:bold;"&gt;OK&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;13.&amp;nbsp;&amp;nbsp; &amp;nbsp;Click &lt;span style="font-weight:bold;"&gt;Add Action&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;14.&amp;nbsp;&amp;nbsp; &amp;nbsp;Select &lt;span style="font-weight:bold;"&gt;Set a field’s value&lt;/span&gt; from the &lt;span style="font-weight:bold;"&gt;Actions &lt;/span&gt;dropdown.&lt;/p&gt;&lt;p&gt;15.&amp;nbsp;&amp;nbsp; &amp;nbsp;Click on the icon next to &lt;span style="font-weight:bold;"&gt;Field &lt;/span&gt;and select the repeating field in your main data source.&lt;/p&gt;&lt;p&gt;16.&amp;nbsp;&amp;nbsp; &amp;nbsp;Click on the icon next to &lt;span style="font-weight:bold;"&gt;Value&lt;/span&gt;, click on Insert field or group and select the repeating node in the secondary data connection.&lt;/p&gt;&lt;p&gt;17.&amp;nbsp;&amp;nbsp; &amp;nbsp;Click &lt;span style="font-weight:bold;"&gt;OK &lt;/span&gt;to close all dialogs.&lt;/p&gt;&lt;p&gt;Finally, we need to manually modify the xpath of the destination to make sure we are only copying into the node we just inserted.&lt;/p&gt;&lt;p&gt;18.&amp;nbsp;&amp;nbsp; &amp;nbsp;In InfoPath, click &lt;span style="font-weight:bold;"&gt;File &lt;/span&gt;&amp;gt; &lt;span style="font-weight:bold;"&gt;Save As Source Files&lt;/span&gt; and choose a destination folder in your local drive.&lt;/p&gt;&lt;p&gt;19.&amp;nbsp;&amp;nbsp; &amp;nbsp;Navigate to that folder and open &lt;span style="font-weight:bold;"&gt;manifest.xsf&lt;/span&gt; in a text editor.&lt;/p&gt;&lt;p&gt;20.&amp;nbsp;&amp;nbsp; &amp;nbsp;Locate the node &lt;span style="font-weight:bold;"&gt;&amp;lt;xsf:ruleSets&amp;gt;&lt;/span&gt; towards the end of the file. This node contains your form’s rules.&lt;/p&gt;&lt;p&gt;21.&amp;nbsp;&amp;nbsp; &amp;nbsp;Find the second rule we created. In the case of our sample form, it looks like this &lt;span style="font-weight:bold;"&gt;&amp;lt;xsf:assignmentAction targetField=&amp;quot;xdXDocument:get-DOM()/my:myFields/my:group1/my:group2/my:field1&amp;quot; expression=&amp;quot;.&amp;quot;&amp;gt;&amp;lt;/xsf:assignmentAction&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;22.&amp;nbsp;&amp;nbsp; &amp;nbsp;Change the rule to add &lt;span style="font-style:italic;"&gt;[last()]&lt;/span&gt;, as seen here: &lt;span style="font-weight:bold;"&gt;&amp;lt;xsf:assignmentAction targetField=&amp;quot;xdXDocument:get-DOM()/my:myFields/my:group1/my:group2/my:field1[last()]&amp;quot; expression=&amp;quot;.&amp;quot;&amp;gt;&amp;lt;/xsf:assignmentAction&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Resave the form and test:&lt;/p&gt;&lt;p&gt;23.&amp;nbsp;&amp;nbsp; &amp;nbsp;Save &lt;span style="font-weight:bold;"&gt;manifest.xsf&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;24.&amp;nbsp;&amp;nbsp; &amp;nbsp;Right-click on the manifest and select &lt;span style="font-weight:bold;"&gt;Design&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;Double-click on the button and then click Rules to verify your rules. This is what your rules will look like once you are done:&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/45377/original.aspx" alt="" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Optionally, select the second action and click &lt;span style="font-weight:bold;"&gt;Modify&lt;/span&gt;. Verify that the xpath to the target field is underlined; this visual cue indicates that InfoPath has recognized our manual modification.&lt;/p&gt;&lt;p&gt;Now you can preview the form and test it! Click on &lt;span style="font-weight:bold;"&gt;copy over&lt;/span&gt; for &lt;span style="font-style:italic;"&gt;John Doe&lt;/span&gt; and that value gets inserted into the destination table.&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/45378/original.aspx" alt="" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Click on &lt;span style="font-weight:bold;"&gt;copy over&lt;/span&gt; for&lt;span style="font-style:italic;"&gt; Bruce Wayne&lt;/span&gt; and that value gets inserted into the destination table.&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/45379/original.aspx" alt="" /&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=45380" width="1" height="1"&gt;</description><category domain="http://www.infopathdev.com/blogs/ernesto/archive/tags/qRules/default.aspx">qRules</category></item></channel></rss>