<?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>Upgrading to InfoPath 2013 causes caching errors</title><link>http://www.infopathdev.com/blogs/patrick/archive/2013/04/28/upgrading-to-infopath-2013-causes-caching-errors.aspx</link><pubDate>Sun, 28 Apr 2013 00:08:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:89304</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;If you have just upgraded InfoPath to 2013 and when you try to open InfoPath forms you get the following error string in your error dialog box details:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;Exception from HRESULT 0x80070002&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;it&amp;#39;s probably an InfoPath&amp;nbsp;cache issue. I upgraded from Office 2013 Preview to 2013 Production today and noticed that some forms were opening fine but others were not. &lt;/p&gt;&lt;p&gt;The solution? Run &amp;quot;infopath.exe /cache clearall&amp;quot; command. That solved my problem beautifully.&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=89304" width="1" height="1"&gt;</description></item><item><title>Full Trust Forms - IP Filler Setting</title><link>http://www.infopathdev.com/blogs/hilary/archive/2013/04/15/full-trust-forms-ip-filler-setting.aspx</link><pubDate>Tue, 16 Apr 2013 00:07:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:88943</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;A qRules user couldn’t open the qRules full trust form for mapping to lists on his computer after installing – he was getting this error:&lt;/p&gt;&lt;p&gt;InfoPath cannot open form &amp;quot;Form template: &lt;a&gt;file:///C:\Program%20Files%20(x86)\Qdabra%20Software\Qdabra%20Rules%20Library%20(Trial%20Version)\Forms\Qdabra%20InfoPath%20to%20SharePoint%20List%20Tool.xsn&lt;/a&gt; The form template cannot be opened, because the system administrator has disabled opening form templates that require full trust.&amp;quot;&lt;/p&gt;&lt;p&gt;He resolved this as follows - &lt;/p&gt;&lt;p&gt;Open InfoPath Filler &amp;gt; Form Options &amp;gt; Trust Center &amp;gt; Trust Center Settings &amp;gt; tick &amp;quot;Allow fully trusted forms to run on my computer&amp;quot; &lt;br /&gt;&lt;img width="839" height="688" style="width:839px;height:688px;" src="http://www.infopathdev.com/blogs/hilary/FullTrust.png" alt="" /&gt;&lt;/p&gt;&lt;p&gt;Raise your hand if you didn&amp;#39;t know about this setting - I didn&amp;#39;t! :-)&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=88943" width="1" height="1"&gt;</description></item><item><title>Create an InfoPath Dashboard form using QueryDocumentNodeSet</title><link>http://www.infopathdev.com/blogs/ernesto/archive/2013/03/19/create-an-infopath-dashboard-form-using-querydocumentnodeset.aspx</link><pubDate>Tue, 19 Mar 2013 15:16:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:88174</guid><dc:creator>ErnestoM</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;In the past we have shown how to create a SharePoint data view to show the data stored in DBXL. Here are some references:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;a&gt;Create a SQL-based SharePoint Data View to access your DBXL Forms&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a&gt;Create a SharePoint 2010 Data View that uses GetListItems to access DBXL forms&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a&gt;Create a SharePoint Data View that uses GetListItems to access DBXL forms&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;These steps involve using SharePoint Designer 2007 or 2010. In SharePoint Designer 2013, the WYSIWYG editor is no longer available, which makes the process of creating a data view more difficult.&lt;/p&gt;&lt;p&gt;Using the QueryDocumentNodeSet web method, contained in the DBXL web service, we can create a codeless, browser compatible InfoPath form which acts as a data view or a Dashboard. &lt;/p&gt;&lt;p&gt;The package includes:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Step by step instructions&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;InfoPathDashboard-QdExpenseReport.XSN&lt;/strong&gt; which is the Dashboard for the Expense Report doctype that comes with DBXL.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;InfoPathDashboard-CustomerContact.XSN&lt;/strong&gt; is the Dashboard after following the steps to reconfigure it to query from the &lt;strong&gt;CustomerContactForm.XSN&lt;/strong&gt; (that form template is also attached).&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;a href="http://www.infopathdev.com/files/folders/88173/download.aspx"&gt;Click here to download the package&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=88174" width="1" height="1"&gt;</description><category domain="http://www.infopathdev.com/blogs/ernesto/archive/tags/DBXL/default.aspx">DBXL</category><category domain="http://www.infopathdev.com/blogs/ernesto/archive/tags/InfoPath+Dashboard/default.aspx">InfoPath Dashboard</category><category domain="http://www.infopathdev.com/blogs/ernesto/archive/tags/data+view/default.aspx">data view</category></item><item><title>Pasting Pictures - InfoPath Makes it Easy!</title><link>http://www.infopathdev.com/blogs/hilary/archive/2013/03/12/pasting-pictures-infopath-makes-it-easy.aspx</link><pubDate>Tue, 12 Mar 2013 15:58:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:87948</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>4</slash:comments><description>&lt;p&gt;Short post - but there is something that I know that I thought everybody knew... and it turns out that may not be the case!&lt;/p&gt;&lt;p&gt;Did you know that you can simply paste pictures into a picture control in InfoPath? This works in 2007, 2010 and 2013 - I don&amp;#39;t have a 2003 machine handy to test on.&lt;/p&gt;&lt;p&gt;&lt;img width="301" height="318" style="width:301px;height:318px;" src="http://www.infopathdev.com/blogs/hilary/picblog.png" alt="" /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You can either right click the control and select Paste or the clipboard icon (depends on version - screenshot above is from IP 2013), or if the control is selected, you can use CTRL + V to paste. Oh - and this can be either for a screenshot on your clipboard or you can copy the picture from your file system. &lt;/p&gt;&lt;p&gt;Bonus - if the picture control is meant to be used with linked pictures (instead of storing the picture in the form), you can open the picture in your browser, copy it and paste it in. If you check the XML, it will contain the link - the form will display the picture.&lt;/p&gt;&lt;p&gt;Have fun saving time! No more browsing the file system for you!&lt;/p&gt;&lt;p&gt;&lt;strong&gt;EDIT: &lt;/strong&gt;Not IPFS (browser form) compatible though - which is unfortunate!&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=87948" width="1" height="1"&gt;</description></item><item><title>RenderForm with SaveToSharepoint Command</title><link>http://www.infopathdev.com/blogs/mark_tienzo/archive/2013/01/30/renderform-with-savetosharepoint-command.aspx</link><pubDate>Tue, 29 Jan 2013 23:50:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:86589</guid><dc:creator>marktienzo</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;&lt;font face="Calibri"&gt;Good day readers. Today we are going to talk about the SaveToSharePoint
command and how you can use it in conjunction with the RenderForm command.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;If you are not yet familiar with the
RenderForm command, I suggest you have a look at my recent blog about it before
continuing this one.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;&lt;font face="Calibri"&gt;This link will take you to RenderForm blog: &lt;/font&gt;&lt;/span&gt;&lt;a href="http://www.infopathdev.com/blogs/mark_tienzo/archive/2012/12/30/renderform-command.aspx"&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;&lt;font color="#0000ff" face="Calibri"&gt;http://www.infopathdev.com/blogs/mark_tienzo/archive/2012/12/30/renderform-command.aspx&lt;/font&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style="font-size:12pt;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;&lt;font face="Calibri"&gt;What is the
SaveToSharepoint command?&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;line-height:normal;mso-outline-level:2;"&gt;&lt;font face="Calibri"&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;&lt;span style="mso-tab-count:1;"&gt;&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;This is one of qRules&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:JA;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;’&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt; advanced command&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:JA;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;s&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;It lets us save a file, a set of
files, an image, or a set of images to a SharePoint document library.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;We need to have access to a SharePoint site
and have a SharePoint document library&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:JA;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt; created in advance&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt; in order to do this.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;font face="Calibri"&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;Let’s &lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:JA;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;look at&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt; the parameters that we can use with the
SaveToSharePoint command:&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpFirst" style="margin:0in 0in 0pt 0.5in;line-height:normal;text-indent:-0.25in;mso-list:l2 level1 lfo1;mso-outline-level:2;mso-add-space:auto;"&gt;&lt;span style="font-family:Symbol;font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-font-family:Symbol;mso-fareast-language:EN-PH;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;·&lt;span style="font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;&lt;b&gt;&lt;span style="font-size:12pt;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;url&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;: This is the URL &lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:JA;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;where&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt; the SharePoint document library is &lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:JA;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;located.&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpMiddle" style="margin:0in 0in 0pt 0.5in;line-height:normal;text-indent:-0.25in;mso-list:l2 level1 lfo1;mso-outline-level:2;mso-add-space:auto;"&gt;&lt;span style="font-family:Symbol;font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-font-family:Symbol;mso-fareast-language:EN-PH;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;·&lt;span style="font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;&lt;b&gt;&lt;span style="font-size:12pt;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;xpath&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;: Here we &lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:JA;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;indicate&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt; the xpath of the file or image attachment &lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:JA;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;within the form.&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpMiddle" style="margin:0in 0in 0pt 0.5in;line-height:normal;text-indent:-0.25in;mso-list:l2 level1 lfo1;mso-outline-level:2;mso-add-space:auto;"&gt;&lt;span style="font-family:Symbol;font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-font-family:Symbol;mso-fareast-language:EN-PH;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;·&lt;span style="font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;&lt;b&gt;&lt;span style="font-size:12pt;mso-fareast-language:JA;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;dsname&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:JA;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;:&lt;b&gt; &lt;/b&gt;This is the name of the data source
where the file field is located, if it is not in the main data soure.&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpMiddle" style="margin:0in 0in 0pt 0.5in;line-height:normal;text-indent:-0.25in;mso-list:l2 level1 lfo1;mso-outline-level:2;mso-add-space:auto;"&gt;&lt;span style="font-family:Symbol;font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-font-family:Symbol;mso-fareast-language:EN-PH;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;·&lt;span style="font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;&lt;b&gt;&lt;span style="font-size:12pt;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;name&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;: This is optional&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:JA;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;.&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt; &lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:JA;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;W&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;e can specify a filename&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:JA;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt; for the file&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt; if we want&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:JA;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;, and&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt; if not&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:JA;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;,&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt; the command will generate a name&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:JA;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;.&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt; &lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:JA;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;I&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;f &lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:JA;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;name&lt;/b&gt;
is omitted&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;, it will also automatically add an extension for the files or images we
attach&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpMiddle" style="margin:0in 0in 0pt 0.5in;line-height:normal;text-indent:-0.25in;mso-list:l2 level1 lfo1;mso-outline-level:2;mso-add-space:auto;"&gt;&lt;span style="font-family:Symbol;font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-font-family:Symbol;mso-fareast-language:EN-PH;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;·&lt;span style="font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;&lt;b&gt;&lt;span style="font-size:12pt;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;overwrite&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;: Also optional, and the
default if we omit this is to no&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:JA;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;t overwrite&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;. &lt;/span&gt;&lt;b&gt;&lt;span style="font-size:12pt;mso-fareast-language:JA;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;overwrite&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt; &lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:JA;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;allows overwriting files with&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt; the same filename if set to yes. This is
unavailable if you use the /dsnamews parameter&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpMiddle" style="margin:0in 0in 0pt 0.5in;line-height:normal;text-indent:-0.25in;mso-list:l2 level1 lfo1;mso-outline-level:2;mso-add-space:auto;"&gt;&lt;span style="font-family:Symbol;font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-font-family:Symbol;mso-fareast-language:EN-PH;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;·&lt;span style="font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;&lt;b&gt;&lt;span style="font-size:12pt;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;dsnamews&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;: This is a data
connection name for copy web service(optional)&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:JA;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;.&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpLast" style="margin:0in 0in 0pt 0.5in;line-height:normal;text-indent:-0.25in;mso-list:l2 level1 lfo1;mso-outline-level:2;mso-add-space:auto;"&gt;&lt;span style="font-family:Symbol;font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-font-family:Symbol;mso-fareast-language:EN-PH;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;·&lt;span style="font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;&lt;b&gt;&lt;span style="font-size:12pt;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;dsurl&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;: (optional)&lt;/span&gt;&lt;font size="3"&gt; &lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;If we use the Copy web service
data connection option with this command, the /url parameter needs to be to the
same site that the data connection used. That is, if I created my data
connection to the copy service using http://serverA but my command url is
http://serverB (and therefore my form is published to serverA), the web method
will fail. The /dsurl parameter can be used with the /dsnamews parameter to
change the service url of the data connection&lt;/span&gt;&lt;/font&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:JA;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt; to match the /url
location&lt;/span&gt;&lt;span style="font-size:12pt;mso-bidi-font-weight:bold;mso-fareast-language:EN-PH;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;line-height:normal;mso-outline-level:2;"&gt;&lt;span style="line-height:115%;font-size:12pt;"&gt;&lt;font face="Calibri"&gt;Important
points to remember when using this command:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpFirst" style="margin:0in 0in 0pt 0.5in;line-height:normal;text-indent:-0.25in;mso-list:l0 level1 lfo2;"&gt;&lt;span style="font-family:Symbol;font-size:12pt;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;·&lt;span style="font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;&lt;span style="font-size:12pt;"&gt;The &lt;/span&gt;&lt;span style="font-size:12pt;mso-fareast-language:JA;"&gt;file or image&lt;/span&gt;&lt;span style="font-size:12pt;"&gt; field we create should have&lt;/span&gt;&lt;span style="font-size:12pt;mso-fareast-language:JA;"&gt; attributes with the names&lt;/span&gt;&lt;span style="font-size:12pt;"&gt; &lt;span style="color:red;"&gt;qRulesLink &lt;/span&gt;and &lt;span style="color:red;"&gt;qRulesFilename &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:12pt;mso-fareast-language:JA;"&gt;(both case sensitive) f&lt;/span&gt;&lt;span style="font-size:12pt;"&gt;or this command to work&lt;/span&gt;&lt;span style="font-size:12pt;mso-fareast-language:JA;"&gt;.&lt;/span&gt;&lt;span style="font-size:12pt;"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpMiddle" style="margin:0in 0in 0pt 0.5in;line-height:normal;text-indent:-0.25in;mso-list:l0 level1 lfo2;"&gt;&lt;span style="font-family:Symbol;font-size:12pt;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;·&lt;span style="font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;&lt;span style="font-size:12pt;"&gt;If we need to
upload more than one file/image, the source field should be &lt;/span&gt;&lt;span style="font-size:12pt;mso-fareast-language:JA;"&gt;in a&lt;/span&gt;&lt;span style="font-size:12pt;"&gt; repeating&lt;/span&gt;&lt;span style="font-size:12pt;mso-fareast-language:JA;"&gt; structure&lt;/span&gt;&lt;span style="font-size:12pt;"&gt;, &lt;/span&gt;&lt;span style="font-size:12pt;mso-fareast-language:JA;"&gt;but &lt;/span&gt;&lt;span style="font-size:12pt;"&gt;it should not be a repeating field &lt;/span&gt;&lt;span style="font-size:12pt;mso-fareast-language:JA;"&gt;within&lt;/span&gt;&lt;span style="font-size:12pt;"&gt; a repeating group.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpLast" style="margin:0in 0in 10pt 0.5in;line-height:normal;text-indent:-0.25in;mso-list:l0 level1 lfo2;"&gt;&lt;span style="font-family:Symbol;font-size:12pt;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;·&lt;span style="font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;&lt;span style="font-size:12pt;"&gt;If there &lt;/span&gt;&lt;span style="font-size:12pt;mso-fareast-language:JA;"&gt;are&lt;/span&gt;&lt;span style="font-size:12pt;"&gt; no attachment&lt;/span&gt;&lt;span style="font-size:12pt;mso-fareast-language:JA;"&gt;(&lt;/span&gt;&lt;span style="font-size:12pt;"&gt;s&lt;/span&gt;&lt;span style="font-size:12pt;mso-fareast-language:JA;"&gt;)&lt;/span&gt;&lt;span style="font-size:12pt;"&gt; the command will perform no action, so make sure you
have a file attached or make a rule &lt;/span&gt;&lt;span style="font-size:12pt;mso-fareast-language:JA;"&gt;so &lt;/span&gt;&lt;span style="font-size:12pt;"&gt;that it only
executes when the &lt;/span&gt;&lt;span style="font-size:12pt;mso-fareast-language:JA;"&gt;field&lt;/span&gt;&lt;span style="font-size:12pt;"&gt; is not empty or blank.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 10pt;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Let’s get started by creating a simple form with the SaveToSharePoint
command only:&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 10pt;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;&lt;span style="mso-tab-count:1;"&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;Here is
the form&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;span style="mso-fareast-language:EN-PH;mso-no-proof:yes;"&gt;&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;&lt;a href="http://www.infopathdev.com/blogs/mark_tienzo/SaveToSharePoint%20Fields.jpg"&gt;&lt;img src="http://www.infopathdev.com/blogs/mark_tienzo/SaveToSharePoint%20Fields.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;span style="mso-fareast-language:EN-PH;mso-no-proof:yes;"&gt;&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;&lt;a href="http://www.infopathdev.com/blogs/mark_tienzo/SaveToSharePoint.jpg"&gt;&lt;img src="http://www.infopathdev.com/blogs/mark_tienzo/SaveToSharePoint.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;&lt;span style="mso-tab-count:1;"&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;The
form consists of a file attachment control(FileAttachment), a
textbox(FileName), a button(where the command will be placed), and another textbox(URL)
to display the URL of the file saved.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;
&lt;/span&gt;Notice I encircled the qRulesLink and qRulesFilename attribute just to
give emphasis to how important these attributes are to the command.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 10pt;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;&lt;span style="mso-tab-count:1;"&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;On the
button control&lt;span style="mso-fareast-language:JA;"&gt;,&lt;/span&gt; I added a rule&lt;span style="mso-fareast-language:JA;"&gt; to set the qRules Command field to:&lt;/span&gt; &lt;span style="mso-fareast-language:JA;"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 10pt;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;&lt;span style="mso-themecolor:accent2;"&gt;concat(&amp;quot;SaveToSharePoint
/url=&lt;/span&gt; &lt;span style="mso-themecolor:accent2;"&gt;http://&amp;lt;servername&amp;gt;/MyDocLib
/xpath=/my:myFields/my:FileAttachment /name=&amp;quot;, FileName)&lt;/span&gt;&lt;span style="mso-fareast-language:JA;"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 10pt;text-indent:0.5in;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&lt;/span&gt;If executed properly&lt;span style="mso-fareast-language:JA;"&gt;,&lt;/span&gt; &lt;span style="mso-fareast-language:JA;"&gt;this&lt;/span&gt; will send the
file to the SharePoint library with the filename you &lt;span style="mso-fareast-language:JA;"&gt;entered&lt;/span&gt;, as seen &lt;span style="mso-fareast-language:JA;"&gt;in&lt;/span&gt; the
picture above.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;See how simple it is&lt;span style="mso-fareast-language:JA;"&gt;?&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 10pt;"&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;"&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 10pt;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;"&gt;Now we are going to integrate this
command with RenderForm.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;I used the form
from my previous blog but tweaked it a little to make the SaveToSharePoint and
RenderForm command work together. Before &lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;mso-fareast-language:JA;"&gt;working on the actual form changes,&lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;"&gt; I created an xml file
to use as a secondary &lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;mso-fareast-language:JA;"&gt;data source&lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;"&gt;
to &lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;mso-fareast-language:JA;"&gt;prevent unnecessary&lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;"&gt;
clutter &lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;mso-fareast-language:JA;"&gt;in&lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;"&gt;
my main data&lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;mso-fareast-language:JA;"&gt; source&lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;"&gt;.
The xml file looks like this in Notepad:&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt 0.5in;line-height:normal;"&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;&amp;lt;FormLogic&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt 0.5in;line-height:normal;"&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;&lt;span style="mso-tab-count:1;"&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;&amp;lt;Values&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt 0.5in;line-height:normal;"&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;&lt;span style="mso-tab-count:2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;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;&amp;lt;RenderedForm
qRulesLink=&amp;quot;&amp;quot; qRulesFilename=&amp;quot;&amp;quot; /&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt 0.5in;line-height:normal;"&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;&lt;span style="mso-tab-count:1;"&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;&amp;lt;/Values&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt 0.5in;line-height:normal;"&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;&amp;lt;/FormLogic&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt 0.5in;line-height:normal;"&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;"&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;mso-fareast-language:JA;"&gt;This file&lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;"&gt; look&lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;mso-fareast-language:JA;"&gt;s&lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;"&gt; like this &lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;mso-fareast-language:JA;"&gt;in&lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;"&gt; the form when we add&lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;mso-fareast-language:JA;"&gt; it&lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;"&gt; &lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;mso-fareast-language:JA;"&gt;as a secondary XML data source &lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;"&gt;(notice I encircled the
attributes again to &lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;mso-fareast-language:JA;"&gt;emphasize&lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;"&gt;
their importance):&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p align="center" class="MsoNormal" style="margin:0in 0in 0pt;text-align:center;line-height:normal;"&gt;&lt;span style="mso-fareast-language:EN-PH;mso-no-proof:yes;"&gt;
 
&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;a href="http://www.infopathdev.com/blogs/mark_tienzo/SaveToSharePoint%20Render%20Secondary.jpg"&gt;&lt;img src="http://www.infopathdev.com/blogs/mark_tienzo/SaveToSharePoint%20Render%20Secondary.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;&lt;p align="center" class="MsoNormal" style="margin:0in 0in 0pt;text-align:center;line-height:normal;"&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Now here is the
main/default view we are going to use:&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 10pt;"&gt;&lt;span style="mso-fareast-language:EN-PH;mso-no-proof:yes;"&gt;
 
&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;&lt;a href="http://www.infopathdev.com/blogs/mark_tienzo/SaveToSharePoint%20Render%20Main.jpg"&gt;&lt;img src="http://www.infopathdev.com/blogs/mark_tienzo/SaveToSharePoint%20Render%20Main.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;a href="http://www.infopathdev.com/blogs/mark_tienzo/SaveToSharePoint%20Render%20Secondary.jpg"&gt;&lt;/a&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 10pt;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;On each button control I used three rules one to render the
view, the second to save it a SharePoint library, and the last to display the
URL of the file saved.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormalCxSpMiddle" style="margin:1em 0px 1em 1in;text-indent:-0.25in;mso-list:l1 level1 lfo3;mso-add-space:auto;"&gt;&lt;font face="Times New Roman"&gt;&lt;span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;"&gt;&lt;span style="mso-list:Ignore;"&gt;&lt;font size="3"&gt;1.&lt;/font&gt;&lt;span style="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;font size="3"&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;mso-fareast-language:JA;"&gt;Set the qRules
Command field to: &lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;mso-themecolor:accent2;"&gt;RenderForm
/allviews=true /resultxpath=/FormLogic/Values/RenderedForm /resultdestds=RenderForm&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormalCxSpMiddle" style="margin:1em 0px 1em 1in;text-indent:-0.25in;mso-list:l1 level1 lfo3;mso-add-space:auto;"&gt;&lt;font face="Times New Roman"&gt;&lt;span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;"&gt;&lt;span style="mso-list:Ignore;"&gt;&lt;font size="3"&gt;2.&lt;/font&gt;&lt;span style="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;font size="3"&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;mso-fareast-language:JA;"&gt;Set the qRules
Command field to&lt;span style="mso-themecolor:accent2;"&gt;: &lt;/span&gt;&lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;mso-themecolor:accent2;"&gt;concat(&amp;quot;SaveToSharePoint /url=&lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;"&gt;
&lt;span style="mso-themecolor:accent2;"&gt;http://&amp;lt;servername&amp;gt;/MyDocLib
/dsname=RenderForm /xpath=/FormLogic/Values/RenderedForm /name=&amp;quot;,
my:FileName)&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormalCxSpMiddle" style="margin:1em 0px 1em 1in;text-indent:-0.25in;mso-list:l1 level1 lfo3;mso-add-space:auto;"&gt;&lt;font face="Times New Roman"&gt;&lt;span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;"&gt;&lt;span style="mso-list:Ignore;"&gt;&lt;font size="3"&gt;3.&lt;/font&gt;&lt;span style="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;font size="3"&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;mso-fareast-language:JA;"&gt;Show a dialog
box: &lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;mso-themecolor:accent2;"&gt;concat(&amp;quot;File saved to
SharePoint library. URL is &amp;quot;, xdXDocument:GetDOM(&amp;quot;RenderForm&amp;quot;)/FormLogic/Values/RenderedForm/@qRulesLink)&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormalCxSpMiddle" style="margin:1em 0px;"&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;mso-themecolor:accent2;"&gt;&lt;font face="Times New Roman" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 10pt;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;If I clicked all the buttons and&lt;span style="mso-fareast-language:JA;"&gt; had them&lt;/span&gt; name&lt;span style="mso-fareast-language:JA;"&gt; each file &lt;/span&gt;True,
Airlines, Sort, Basketball, AirlinesSortBasketball respectively, this is how it
&lt;span style="mso-fareast-language:JA;"&gt;would&lt;/span&gt; look &lt;span style="mso-fareast-language:JA;"&gt;in&lt;/span&gt; the SharePoint library:&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 10pt;"&gt;&lt;span style="mso-fareast-language:EN-PH;mso-no-proof:yes;"&gt;
 
&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;&lt;a href="http://www.infopathdev.com/blogs/mark_tienzo/SaveToSharePoint%20Render%20SharePoint.jpg"&gt;&lt;img src="http://www.infopathdev.com/blogs/mark_tienzo/SaveToSharePoint%20Render%20SharePoint.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 10pt;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;"&gt;Now&lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;mso-fareast-language:JA;"&gt; I hope&lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;"&gt; you’re excited to see how the file will
look when we open it.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;Click on the
filename, then save, then open&lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;mso-fareast-language:JA;"&gt; &lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;"&gt;(I
&lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;mso-fareast-language:JA;"&gt;am using Internet Explorer in this case&lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;"&gt;).
Here is what it looks like when we click on the topmost file which is
AirlinesSortBasketball on a tab of Internet Explorer:&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;a href="http://www.infopathdev.com/blogs/mark_tienzo/SaveToSharePoint%20Render%20View.jpg"&gt;&lt;img src="http://www.infopathdev.com/blogs/mark_tienzo/SaveToSharePoint%20Render%20View.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 10pt;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;"&gt;This is how we&lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;mso-fareast-language:JA;"&gt; can&lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;"&gt; use the SaveToSharePoint and RenderForm
command together.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;I hope you learned
something from &lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;mso-fareast-language:JA;"&gt;this&lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;"&gt;.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;Try it out to see how simple it is to use
these commands in qRules&lt;/span&gt;&lt;span style="mso-fareast-theme-font:minor-fareast;mso-fareast-language:JA;"&gt;!&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=86589" width="1" height="1"&gt;</description></item><item><title>Create an XTP to Lock and Unlock DBXL forms</title><link>http://www.infopathdev.com/blogs/ernesto/archive/2013/01/18/create-an-xtp-to-lock-and-unlock-dbxl-forms.aspx</link><pubDate>Fri, 18 Jan 2013 19:03:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:86207</guid><dc:creator>ErnestoM</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;This tutorial allows you to create an InfoPath template part (XTP) that will lock and unlock forms that are stored in DBXL. You can reuse this XTP in any form template where you wish to provide this functionality to your users.&lt;/p&gt;&lt;p&gt;Please &lt;a href="http://www.infopathdev.com/files/folders/86206/download.aspx"&gt;click here to obtain the PDF tutorial&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=86207" width="1" height="1"&gt;</description><category domain="http://www.infopathdev.com/blogs/ernesto/archive/tags/DBXL/default.aspx">DBXL</category><category domain="http://www.infopathdev.com/blogs/ernesto/archive/tags/data+integrity/default.aspx">data integrity</category></item><item><title>qRules SubmitToSharePointList and a Person or Group Column type</title><link>http://www.infopathdev.com/blogs/hilary/archive/2013/01/17/qrules-submittosharepointlist-and-a-person-or-group-column-type.aspx</link><pubDate>Thu, 17 Jan 2013 23:05:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:86166</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;This just came up again &lt;a href="http://www.infopathdev.com/forums/p/15290/86156.aspx#86156"&gt;here&lt;/a&gt;, and I have to admit I have to look it up myself every time it does come up! So - for future reference, if you need to submit data to a person or group column in a SharePoint list, you can submit -1;#&lt;em&gt;&lt;u&gt;userid&lt;/u&gt;&lt;/em&gt; with &lt;em&gt;&lt;u&gt;userid&lt;/u&gt;&lt;/em&gt; replaced with an actual user ID. If you need to submit multiple values, separate them with ;#&lt;/p&gt;&lt;p&gt;-1;#user1;#-1;#user2&lt;/p&gt;&lt;p&gt;And so on...&lt;/p&gt;&lt;p&gt;SubmitToSharePointList submits CAML to the UpdateListItems method of the SharePoint Lists web service, so if you are submitting using your own custom code, or what-have-you, this will work for you too.&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=86166" width="1" height="1"&gt;</description></item><item><title>Get rid of that "Control binding is not supported" error on your Design Checker!</title><link>http://www.infopathdev.com/blogs/mel_balsamo/archive/2013/01/14/get-rid-of-that-quot-control-binding-is-not-supported-quot-error-on-your-design-checker.aspx</link><pubDate>Mon, 14 Jan 2013 10:49:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:86003</guid><dc:creator>Mel Balsamo</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Got calculated values on your InfoPath browser form? Do they involve filters and/or complex formulas? Surprised to find out that as soon as you&amp;#39;re ready to publish your form, there goes the Design Checker error on the taskpane --- &amp;quot;Control binding is not supported&amp;quot;&lt;/p&gt;

&lt;p&gt;&lt;img style="width:206px;height:145px;" src="http://www.infopathdev.com/blogs/mel_balsamo/images/ipfs/image1.jpg" width="206" height="145" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/ipfs/image2.jpg" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;Hilary, one of our InfoPath experts, blogged something about this - &lt;a href="http://www.infopathdev.com/blogs/hilary/archive/2012/01/19/ipfs-design-checker-errors-amp-print-preview.aspx"&gt;here&amp;#39;s her post&lt;/a&gt;. She suggested a workaround of manually modifying the form source files which wondefully works. Her readers asked if there&amp;#39;s a way to do this without tinkering with the source - there is indeed! And it is easy... read on!&lt;/p&gt;

&lt;p&gt;To reproduce the scenario and better understand when this issue actually occurs, create a simple form by following these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Add a repeating table with 2 columns.&lt;/li&gt;

&lt;li&gt;Add a calculated value control&amp;nbsp;and set it to display the repeating group&amp;#39;s &lt;strong&gt;field1&lt;/strong&gt; node - we know that this will display only the first row&amp;#39;s &lt;strong&gt;field1&lt;/strong&gt; value, but we won&amp;#39;t care about that for now.&lt;/li&gt;

&lt;li&gt;Go to &lt;strong&gt;File&lt;/strong&gt; &amp;gt; &lt;strong&gt;Design&lt;/strong&gt; &lt;strong&gt;Checker&lt;/strong&gt; --- no errors, good! Not surprising, but good.&lt;/li&gt;

&lt;li&gt;Add another calculated value control - the value this time will be the &lt;strong&gt;field1&lt;/strong&gt; node filtered when &lt;em&gt;field2 is not blank&lt;/em&gt;. So you&amp;#39;d select &lt;strong&gt;Calculated Value&lt;/strong&gt; from the &lt;em&gt;Controls&lt;/em&gt; menu &amp;gt; click on the &lt;strong&gt;&lt;em&gt;fx&lt;/em&gt;&lt;/strong&gt; button &amp;gt; &lt;em&gt;Insert Field or Group&lt;/em&gt; &amp;gt; select &lt;strong&gt;field1&lt;/strong&gt; &amp;gt; &lt;em&gt;Filter Data&lt;/em&gt; &amp;gt; &lt;em&gt;Add&lt;/em&gt; &amp;gt; &lt;em&gt;field2 is not blank&lt;/em&gt; &amp;gt; click &lt;strong&gt;OK&lt;/strong&gt; five times.
&lt;p&gt;Here&amp;#39;s what we have so far:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/ipfs/image3.jpg" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;Let&amp;#39;s preview the form to make sure it&amp;#39;s working so far...&lt;/p&gt;

&lt;p&gt;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/ipfs/image4.jpg" alt="" /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;Close Preview and click &lt;strong&gt;Refresh&lt;/strong&gt; on the Design Checker pane - still no error...
&lt;p&gt;And here&amp;#39;s where we try reproducing the issue - we&amp;#39;ll make that design checker error appear...&lt;br /&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;Right-click on the first calculated value&amp;#39;s control and select &lt;strong&gt;Calculated Value Properties &lt;/strong&gt;&amp;gt; click on the &lt;strong&gt;&lt;em&gt;fx&lt;/em&gt;&lt;/strong&gt; button and just click &lt;strong&gt;OK&lt;/strong&gt; twice to close it without changing anything - just humor me here, ok? Now click &lt;strong&gt;Refresh&lt;/strong&gt; again - no error.&lt;/li&gt;&lt;li&gt;Repeat the same actions on Step 6, this time with the &lt;u&gt;second&lt;/u&gt; calculated value --- so look at the formula in the properties dialog box, don&amp;#39;t change anything and hit &lt;strong&gt;OK&lt;/strong&gt; to close it.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Click Refresh --- bam! There&amp;#39;s your error.&lt;/p&gt;&lt;p&gt;At this point, we&amp;#39;ll wonder - is it a bug in InfoPath? I&amp;nbsp;don&amp;#39;t know. But here&amp;#39;s where I think Hilary&amp;#39;s observation comes to play - it might&amp;#39;ve already added that &amp;quot;xd:binding&amp;quot; attribute in the xsl file as soon as we clicked OK, InfoPath thinking that we &amp;quot;modified&amp;quot; it. If you Undo once from that last step and refresh again, the error will go away. But who&amp;nbsp;can keep track?&amp;nbsp;(Note to self: don&amp;#39;t click OK&amp;nbsp;in edit mode dialogs when I really did not change anything - there&amp;#39;s a Cancel button after all!)&lt;/p&gt;&lt;p&gt;The solution, aside from manually modifying the source files, is to ---- &lt;font color="#006600"&gt;&lt;strong&gt;delete the calculated value and add a fresh one&lt;/strong&gt;&lt;/font&gt;! Yes! But before you delete, make sure to grab your formula first - copy it, so that you won&amp;#39;t need to rebuild it on your fresh calculated value as you can just paste&amp;nbsp;the expression&amp;nbsp;in the formula box. Now that&amp;#39;s easy enough, at least for me.&lt;/p&gt;&lt;p&gt;So we know that this will occur everytime you&amp;#39;d go to the formula and edit it (what a pain). Again, who can keep track? The goodness left in this is that InfoPath will still be friendly enough to point all instances of this error when it&amp;#39;s time to publish your form. So keep working, just keep adding your calculated values, modify them all you want. When you publish, you&amp;#39;d end up with 10 or more errors like this, but when you click on each, your cursor will point to the exact calculated value that needs to be recreated. You can then fix them all at once.&lt;/p&gt;&lt;p&gt;Hope this helps...&lt;/p&gt;&lt;ol&gt;
&lt;/ol&gt;
&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=86003" width="1" height="1"&gt;</description><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/browser+forms/default.aspx">browser forms</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/calculated+value/default.aspx">calculated value</category><category domain="http://www.infopathdev.com/blogs/mel_balsamo/archive/tags/Design+Checker+error/default.aspx">Design Checker error</category></item><item><title>Sort Repeating Items On-the-fly - with qRules!</title><link>http://www.infopathdev.com/blogs/hilary/archive/2013/01/09/sort-repeating-items-on-the-fly-with-qrules.aspx</link><pubDate>Wed, 09 Jan 2013 17:47:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:85902</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;We recently had a bit of a challenge with one of our internal forms - we wanted to easily be able to re-order some repeating rows, and the approaches we&amp;#39;d tried thus far (using the out of the box InfoPath &lt;em&gt;&lt;u&gt;Move Up&lt;/u&gt;&lt;/em&gt; and &lt;u&gt;&lt;em&gt;Move Down&lt;/em&gt;&lt;/u&gt; menu options, little arrow buttons that used qRules to change the value of a field for order and re-sorting, etc.) were not exactly making our collective hearts sing. A bit of a re-think was in order!&lt;/p&gt;
&lt;p&gt;I like the way SharePoint lets me sort columns in a view:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/OnTheFly/sof1.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;I can indicate the position I want, and the other columns automatically get their new order number based off the position I&amp;#39;ve selected:&lt;br /&gt;&lt;img style="WIDTH:426px;HEIGHT:233px;" src="http://www.infopathdev.com/blogs/hilary/OnTheFly/sof2.png" width="426" height="233" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Now, I confess - I&amp;#39;m not crazy about a dropdown for this, so I didn&amp;#39;t bother with that in this implementation - however,&amp;nbsp;I will address some basic error handling around invalid data entry. The form samples attached to this blog post use a trial of qRules that expires 3/15/2013 - if you are trying this after that date, you&amp;#39;ll need to re-inject with a new trial - here&amp;#39;s a &lt;a href="http://www.qdabra.com/en/products/download/qRulesTrial.aspx"&gt;link&lt;/a&gt; to the trial download. Also, the form samples are InfoPath 2007 and are &lt;em&gt;not&lt;/em&gt; browser forms - you can try this in IPFS if you&amp;#39;d like, but I am using attributes to hold some data to help with re-ordering, and if you decide to try to implement this in the browser, I&amp;#39;d recommend using elements instead of attributes, since I have seen some event bubbling in IPFS with attributes in the past (i.e. - a changed attribute causing logic on its parent element to execute).&lt;/p&gt;
&lt;p&gt;I&amp;#39;m starting with &lt;a href="http://www.infopathdev.com/blogs/hilary/OnTheFly/SortOnTheFly.xsn"&gt;this&lt;/a&gt; form. I&amp;#39;ve added default data so that I don&amp;#39;t have to bother filling it out as I test it:&lt;br /&gt;&lt;img style="WIDTH:678px;HEIGHT:290px;" src="http://www.infopathdev.com/blogs/hilary/OnTheFly/sof3.png" width="678" height="290" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;The initial data source is relatively simple:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/OnTheFly/sof4.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;I like to use an XML secondary data source for logic fields when possible (that is, fields needed for rules, but not really relevant to the form&amp;#39;s data) - so &lt;a href="http://www.infopathdev.com/blogs/hilary/OnTheFly/FormLogic.xml"&gt;here&amp;#39;s&lt;/a&gt; the XML:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/OnTheFly/sof5.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Add a secondary data connection to your form that uses this XML:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/OnTheFly/sof6.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.infopathdev.com/blogs/hilary/OnTheFly/SortOnTheFlyWith2DS.xsn"&gt;Here&amp;#39;s&lt;/a&gt; the form with that added, in case you need it.&lt;/p&gt;
&lt;p&gt;Okay - I just said above that I like to use secondary data sources for fields that are just for logic and here I go breaking my own little rule - but sometimes you have to make exceptions for repeating data because you have logic that needs to be executed on &lt;em&gt;this&lt;/em&gt; instance of the group. In this case, I am adding 3 attributes to my &lt;u&gt;&lt;em&gt;Order&lt;/em&gt;&lt;/u&gt; element to help me in my endeavors:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/OnTheFly/sof7.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.infopathdev.com/blogs/hilary/OnTheFly/SortOnTheFlyWithAttributes.xsn"&gt;Here&amp;#39;s&lt;/a&gt; the form again with those attributes added.&lt;/p&gt;
&lt;p&gt;Since I&amp;#39;m using default data, I&amp;#39;ve set the &lt;u&gt;&lt;em&gt;initialOrder&lt;/em&gt;&lt;/u&gt; for each of my existing rows manually. However, in order to handle for newly added rows, we need a rule to set the &lt;u&gt;&lt;em&gt;Order&lt;/em&gt;&lt;/u&gt; and the &lt;u&gt;&lt;em&gt;initialOrder&lt;/em&gt;&lt;/u&gt; when a new row is added. I&amp;#39;ve added a rule to the repeating &lt;u&gt;&lt;em&gt;Book&lt;/em&gt;&lt;/u&gt; node for this:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/OnTheFly/sof11.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;All the pieces are in place, so let&amp;#39;s take a look at the rules and test it out. Our goal is to be able to change the order number for a row and:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Have the other rows &lt;u&gt;&lt;em&gt;Order&lt;/em&gt;&lt;/u&gt; numbers update as needed&lt;/li&gt;
&lt;li&gt;Resort the rows to put them in the desired order&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;&lt;img style="WIDTH:819px;HEIGHT:482px;" src="http://www.infopathdev.com/blogs/hilary/OnTheFly/sof21.png" width="937" height="537" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;The first rule I&amp;#39;m going to add is on the &lt;u&gt;&lt;em&gt;Order&lt;/em&gt;&lt;/u&gt; element - I&amp;#39;ve named it &lt;strong&gt;Trigger Increment&lt;/strong&gt;, and I&amp;#39;m adding a condition on it - I only want it to run when the &lt;em&gt;&lt;u&gt;EditingOrderPosition &lt;/u&gt;&lt;/em&gt;field in my secondary &lt;strong&gt;FormLogic&lt;/strong&gt; data source is blank:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/OnTheFly/sof9.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;I want this rule to execute only when I change the &lt;u&gt;&lt;em&gt;Order&lt;/em&gt;&lt;/u&gt; field myself - I&amp;#39;m using the &lt;em&gt;&lt;u&gt;EditingOrderPosition&lt;/u&gt;&lt;/em&gt; condition to prevent creating a loop, because I know that my rules are going to cause other instances of the &lt;u&gt;&lt;em&gt;Order&lt;/em&gt;&lt;/u&gt; field to change. So, the first action I&amp;#39;ll add to my rule is to set that field&amp;#39;s value:&lt;br /&gt;&lt;img style="WIDTH:656px;HEIGHT:435px;" src="http://www.infopathdev.com/blogs/hilary/OnTheFly/sof10.png" width="656" height="435" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;I am setting it to the count of preceding-sibling &lt;u&gt;&lt;em&gt;Book&lt;/em&gt;&lt;/u&gt; nodes - I&amp;#39;ll use this in another condition later. If your repeating data has a unique identifier, you could also leverage that here - set &lt;em&gt;&lt;u&gt;EditingOrderPosition&lt;/u&gt;&lt;/em&gt; to the field with the unique identifier and then, in the condition check on the &lt;em&gt;&lt;u&gt;editing&lt;/u&gt;&lt;/em&gt; attribute, ensure the row does not have the same unique identifier.&lt;/p&gt;
&lt;p&gt;Next, I set the &lt;u&gt;&lt;em&gt;increment&lt;/em&gt;&lt;/u&gt; attribute to the &lt;u&gt;&lt;em&gt;Order&lt;/em&gt;&lt;/u&gt; field minus the &lt;u&gt;&lt;em&gt;initialOrder&lt;/em&gt;&lt;/u&gt; attribute - the &lt;u&gt;&lt;em&gt;initialOrder&lt;/em&gt;&lt;/u&gt; attribute contains the original value of the &lt;u&gt;&lt;em&gt;Order&lt;/em&gt;&lt;/u&gt; field, and after the user changes the &lt;u&gt;&lt;em&gt;Order&lt;/em&gt;&lt;/u&gt; field, the difference between the two will let us know how we need to increment our other fields.&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/OnTheFly/sof12.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;When the form is running, this is the point where the rule on the &lt;u&gt;&lt;em&gt;increment&lt;/em&gt;&lt;/u&gt; attribute will fire, so let&amp;#39;s go take a look at those and we&amp;#39;ll come back to the rules on &lt;u&gt;&lt;em&gt;Order&lt;/em&gt;&lt;/u&gt; after&amp;nbsp;we walk through the rest of the logic.&amp;nbsp;&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/OnTheFly/sof22.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;There are two rules on the &lt;u&gt;&lt;em&gt;increment&lt;/em&gt;&lt;/u&gt; field - one if &lt;u&gt;&lt;em&gt;increment&lt;/em&gt;&lt;/u&gt; is less than zero and one if it is greater than zero. I&amp;#39;ve also included a 2ds field named &lt;em&gt;&lt;u&gt;Sorting&lt;/u&gt; &lt;/em&gt;in my condition - I use that when I sort the data to prevent rules from firing during the sort (however, I&amp;#39;ve done a little additional testing, and it appears it is not necessary at this level - only at the &lt;em&gt;&lt;u&gt;Book&lt;/u&gt;&lt;/em&gt; level if I wanted to prevent that logic from firing).&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;Negative Increment&lt;/strong&gt; ruleset (runs if the value of &lt;em&gt;&lt;u&gt;increment&lt;/u&gt;&lt;/em&gt; is negative)&amp;nbsp;looks like this:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/OnTheFly/sof23.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;First, I&amp;#39;m setting a helper field in my 2ds to the correct amount to increment the field. Then, since our &lt;u&gt;&lt;em&gt;Order&lt;/em&gt;&lt;/u&gt; field is less than its &lt;u&gt;&lt;em&gt;initialOrder&lt;/em&gt;&lt;/u&gt; (i.e., the &lt;u&gt;&lt;em&gt;increment&lt;/em&gt;&lt;/u&gt; attribute is negative), I need to add one to all &lt;u&gt;&lt;em&gt;Order&lt;/em&gt;&lt;/u&gt; fields that are greater than or equal to the current value of the &lt;u&gt;&lt;em&gt;Order&lt;/em&gt;&lt;/u&gt; field I just modified and less than the &lt;u&gt;&lt;em&gt;initialOrder&lt;/em&gt;&lt;/u&gt; attribute of the &lt;u&gt;&lt;em&gt;Order&lt;/em&gt;&lt;/u&gt; field I just modified. So, if my &lt;u&gt;&lt;em&gt;Order&lt;/em&gt;&lt;/u&gt; had the value of&amp;nbsp;4 (with the &lt;u&gt;&lt;em&gt;initialOrder&lt;/em&gt;&lt;/u&gt; also being 4) and I change &lt;u&gt;&lt;em&gt;Order&lt;/em&gt;&lt;/u&gt; to 1, any field with a value greater than or equal to 1 and less than 4 needs to have 1 added to it. Whew.&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/OnTheFly/sof16.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;In the rule above, I am setting the &lt;u&gt;&lt;em&gt;editing&lt;/em&gt;&lt;/u&gt; attribute for all fields that meet that condition to true, to execute another rule that increments the row order:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/OnTheFly/sof24.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;This adds the current &lt;u&gt;&lt;em&gt;OrderIncrement&lt;/em&gt;&lt;/u&gt; to the &lt;u&gt;&lt;em&gt;Order&lt;/em&gt;&lt;/u&gt; - but note the condition to that will prevent the rule from executing if the field is the same that initiated the sequence (mentioned above - if you used a unique identifier instead of a count of preceding-sibling, you&amp;#39;d use that for the condition instead of the count):&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/OnTheFly/sof25.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;A second rule re-sets the &lt;u&gt;&lt;em&gt;editing&lt;/em&gt;&lt;/u&gt; field back to false if it is true:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/OnTheFly/sof26.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Back on the &lt;em&gt;&lt;u&gt;increment&lt;/u&gt;&lt;/em&gt; field, the rules for &lt;strong&gt;Positive Increment&lt;/strong&gt; are similar to the ones for &lt;strong&gt;Negative Increment&lt;/strong&gt;:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/OnTheFly/sof27.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;The condition in this case is that the &lt;em&gt;&lt;u&gt;increment&lt;/u&gt;&lt;/em&gt; attribute is greater than 0 (along with &lt;em&gt;&lt;u&gt;Sorting&lt;/u&gt;&lt;/em&gt; being blank), and I set the &lt;em&gt;&lt;u&gt;OrderIncrement&lt;/u&gt;&lt;/em&gt; helper field to -1. In this case, since our &lt;em&gt;&lt;u&gt;Order&lt;/u&gt;&lt;/em&gt; field is greater than its &lt;em&gt;&lt;u&gt;initialOrder&lt;/u&gt;&lt;/em&gt; (i.e., the &lt;em&gt;&lt;u&gt;increment&lt;/u&gt;&lt;/em&gt; attribute is positive), I need to subtract one from all &lt;em&gt;&lt;u&gt;Order&lt;/u&gt;&lt;/em&gt; fields that are less than or equal to the current value of the &lt;em&gt;&lt;u&gt;Order&lt;/u&gt;&lt;/em&gt; field I just modified and greater that the &lt;em&gt;&lt;u&gt;initialOrder&lt;/u&gt;&lt;/em&gt; attribute of the &lt;em&gt;&lt;u&gt;Order&lt;/u&gt;&lt;/em&gt; field I just modified. So, if my &lt;em&gt;&lt;u&gt;Order&lt;/u&gt;&lt;/em&gt; had the value of 1 (with the &lt;em&gt;&lt;u&gt;initialOrder&lt;/u&gt;&lt;/em&gt; also being 1) and I change &lt;em&gt;&lt;u&gt;Order&lt;/u&gt;&lt;/em&gt; to 4, any field with a value less than or equal to 4 and greater than 1 needs to have 1 subtracted from it. &lt;/p&gt;
&lt;p&gt;Guess what? We are finally back to the rules on the Order field! The remaining actions in the ruleset are pretty straight-forward:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/OnTheFly/sof28.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;I set my helper node, &lt;em&gt;&lt;u&gt;EditingOrderPosition&lt;/u&gt;&lt;/em&gt; back to blank. I set my &lt;em&gt;&lt;u&gt;Sorting&lt;/u&gt;&lt;/em&gt; node to true (to prevent rules firing during sorting that I don&amp;#39;t want to have fire), and then execute a qRules command to sort the rows based on &lt;em&gt;&lt;u&gt;Order&lt;/u&gt;&lt;/em&gt;:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/OnTheFly/sof29.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Finally, prior to my &lt;strong&gt;Trigger Increment&lt;/strong&gt; ruleset, I have a rule to handle for invalid data. The condition ensures that the user has entered a positive number:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/OnTheFly/sof30.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;If they have not, a message is displayed and the &lt;em&gt;&lt;u&gt;Order&lt;/u&gt;&lt;/em&gt; is set back to the &lt;em&gt;&lt;u&gt;initialOrder&lt;/u&gt;&lt;/em&gt;:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/OnTheFly/sof31.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Note the use of the &amp;quot;Don&amp;#39;t run remaining rules if the condition of this rule is met&amp;quot; checkbox - we don&amp;#39;t want to execute the &lt;strong&gt;Trigger Increment&lt;/strong&gt;&amp;nbsp;rule unnecessarily. &lt;a href="http://www.infopathdev.com/blogs/hilary/OnTheFly/SortOnTheFlyFinal.xsn"&gt;Here&amp;#39;s&lt;/a&gt; the final form - I encourage you to download it to walk through the rules, since this blog post&amp;nbsp;is not so much a step-by-step how-to (that would have been mind-numbingly long) and more of a guideline.&lt;/p&gt;
&lt;p&gt;A few more points of interest on this form - so far, I am also able to use the InfoPath &lt;em&gt;&lt;u&gt;Move Up&lt;/u&gt;&lt;/em&gt; and &lt;em&gt;&lt;u&gt;Move Down&lt;/u&gt;&lt;/em&gt; right-click menu widgets with this (due to the re-numbering logic on the &lt;em&gt;&lt;u&gt;Book&lt;/u&gt;&lt;/em&gt; node) and the right-click &lt;em&gt;&lt;u&gt;Insert&lt;/u&gt;&lt;/em&gt; options also work well - adding a new row in-between existing rows allows all &lt;em&gt;&lt;u&gt;Order&lt;/u&gt;&lt;/em&gt; nodes to update their values. However, I don&amp;#39;t have anything to handle for delete / cut. The logic is somewhat self-correcting - if you delete a row the numbers after it will be off only until a new row is added or the rows are re-sorted, but it is a weakness I wanted to highlight. If you can think of a good way to handle for this, leave a comment and let me know!&lt;/p&gt;
&lt;p&gt;When we use qRules SortTable, the nodes that are being sorted are actually deleted and re-added. I could have used my &lt;em&gt;&lt;u&gt;Sorting&lt;/u&gt;&lt;/em&gt; helper node to prevent the rules on the &lt;em&gt;&lt;u&gt;Book&lt;/u&gt;&lt;/em&gt; node from firing - but then I realized I could leverage this behavior to reset my &lt;em&gt;&lt;u&gt;initialOrder&lt;/u&gt;&lt;/em&gt; attribute as well as handle for user entries that are greater than the number of items in the table - that is, if a user enters a too-high number, the rules on &lt;em&gt;&lt;u&gt;Book&lt;/u&gt;&lt;/em&gt; that fire during the sorting will correct the number.&lt;/p&gt;
&lt;p&gt;Also - I think this could be implemented without qRules (although I haven&amp;#39;t tried) using &lt;a href="http://www.infopathdev.com/blogs/hilary/archive/2009/06/07/hack-manifest-xsf-to-filter-the-target-of-a-rule.aspx"&gt;this&lt;/a&gt; method to set the correct &lt;em&gt;&lt;u&gt;editing&lt;/u&gt;&lt;/em&gt; attributes and manually modifying the view to include &lt;a href="http://www.w3schools.com/xsl/el_sort.asp"&gt;xsl:sort&lt;/a&gt; and a &lt;a href="http://msdn.microsoft.com/en-us/library/office/bb251011(v=office.12).aspx"&gt;preserve code block&lt;/a&gt; (this won&amp;#39;t be browser compatible).&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=85902" width="1" height="1"&gt;</description></item><item><title>RenderForm Command</title><link>http://www.infopathdev.com/blogs/mark_tienzo/archive/2012/12/31/renderform-command.aspx</link><pubDate>Mon, 31 Dec 2012 00:08:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:85689</guid><dc:creator>marktienzo</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;The new “RenderForm” command&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;span style="mso-tab-count:1;"&gt;&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;When qRules 4.3 was launched last
December 21, 2012 one of the newest commands was RenderForm. This command
generates an HTML rendering of &lt;span style="line-height:115%;font-size:10pt;mso-bidi-font-size:11.0pt;mso-fareast-theme-font:minor-fareast;mso-ansi-language:EN-PH;mso-fareast-language:JA;mso-bidi-language:AR-SA;"&gt;one or more of &lt;/span&gt;the form’s views.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;
&lt;/span&gt;In other words it gives us the ability to output a rendered copy of the
form in a browser, by saving it as an HTML file, or it can provide&amp;nbsp;us the
rendered form as HTML code that we can edit or save using a text editor, e.g.
Notepad, Notepad++, to later view it in a browser.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;What are the parameters used in
RenderForm?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt 0.5in;line-height:normal;"&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="color:red;font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;views&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;(optional):
you can indicate which view to render, or render multiple views in one HTML file
by listing the views you want separated by ampersands (&amp;amp;).&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt 0.5in;line-height:normal;"&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="color:red;font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;allviews&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;(optional): specify “true” for this value to render all of the form’s
views in a single HTML file&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt 0.5in;line-height:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt 0.5in;line-height:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt 0.5in;line-height:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="color:red;"&gt;output&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;(optional):
possible values are:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt 75pt;line-height:normal;text-indent:-0.25in;mso-list:l0 level1 lfo1;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;span style="mso-list:Ignore;"&gt;•&lt;span style="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 style="mso-bidi-font-weight:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;base64&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt; which is the default and outputs the rendered HTML as a base64 InfoPath
attachment, which can be used in an attachment control&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt 75pt;line-height:normal;text-indent:-0.25in;mso-list:l0 level1 lfo1;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;span style="mso-list:Ignore;"&gt;•&lt;span style="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 style="mso-bidi-font-weight:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;raw&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt; which outputs the rendered HTML as a string value&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt 0.5in;line-height:normal;"&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="color:red;font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;filename&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;(optional): Allows specifying a filename for the&amp;nbsp;output HTML file.
This is only applicable when using base64 output. The default value is
“rendered.htm”.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;Some points to remember…&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt 0.75in;line-height:normal;text-indent:-0.25in;mso-list:l1 level1 lfo2;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;span style="mso-list:Ignore;"&gt;•&lt;span style="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 style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;This
command requires the form to be full trust.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt 0.75in;line-height:normal;text-indent:-0.25in;mso-list:l1 level1 lfo2;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;span style="mso-list:Ignore;"&gt;•&lt;span style="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 style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;Do not
use both the /allviews and /views parameters at the same time.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt 0.75in;line-height:normal;text-indent:-0.25in;mso-list:l1 level1 lfo2;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;span style="mso-list:Ignore;"&gt;•&lt;span style="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 style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;This
command is not compatible with MOSS 2007 browser form but is compatible with
SharePoint 2010 browser forms.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt 0.75in;line-height:normal;text-indent:-0.25in;mso-list:l1 level1 lfo2;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;span style="mso-list:Ignore;"&gt;•&lt;span style="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 style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;View
names are case-sensitive. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 5pt 0.75in;line-height:normal;text-indent:-0.25in;mso-list:l1 level1 lfo2;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;span style="mso-list:Ignore;"&gt;•&lt;span style="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 style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;If specifying a filename, always include an
extension for the filename.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;Here are an example I have created
for you…&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;text-indent:0.5in;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;The screenshots below are from a form I created with four simple views
to help us understand and also have a visual idea of how RenderForm works.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;By having this visual representation you can
see how different page layouts, colors, text, etc. will look in the browser.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 5pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;I called the first view &lt;i style="mso-bidi-font-style:normal;"&gt;Render Command&lt;/i&gt;. I placed some of the possible combination of
commands we can use on a button control: &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;
 
&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;&lt;a href="http://www.infopathdev.com/blogs/mark_tienzo/Render%20Command%20View.jpg"&gt;&lt;a href="http://www.infopathdev.com/blogs/mark_tienzo/Render%20Command%20View.jpg"&gt;&lt;img src="http://www.infopathdev.com/blogs/mark_tienzo/Render%20Command%20View.jpg" border="0" alt="" /&gt;&lt;/a&gt;
 
 
&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 5pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;The second view is called &lt;i style="mso-bidi-font-style:normal;"&gt;PAL&lt;/i&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;
 
&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;&lt;a href="http://www.infopathdev.com/blogs/mark_tienzo/PAL%20View.jpg"&gt;&lt;img src="http://www.infopathdev.com/blogs/mark_tienzo/PAL%20View.jpg" border="0" alt="" /&gt;&lt;/a&gt;
 
 
&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 5pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&amp;nbsp;This is the third view and it’s named &lt;i style="mso-bidi-font-style:normal;"&gt;NBA&lt;/i&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;
 
&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;&lt;a href="http://www.infopathdev.com/blogs/mark_tienzo/NBA%20View.jpg"&gt;&lt;img src="http://www.infopathdev.com/blogs/mark_tienzo/NBA%20View.jpg" border="0" alt="" /&gt;&lt;/a&gt;
 
 
&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 5pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;The last view is called &lt;i style="mso-bidi-font-style:normal;"&gt;Sort.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;
 
&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;&lt;a href="http://www.infopathdev.com/blogs/mark_tienzo/Sort%20View.jpg"&gt;&lt;img src="http://www.infopathdev.com/blogs/mark_tienzo/Sort%20View.jpg" border="0" alt="" /&gt;&lt;/a&gt;
 
 
&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;&lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;We are going to use the Render
Form view to use some of the RenderForm commands…&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;
 
&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;&lt;a href="http://www.infopathdev.com/blogs/mark_tienzo/AllViewClick.jpg"&gt;&lt;img src="http://www.infopathdev.com/blogs/mark_tienzo/AllViewClick.jpg" border="0" alt="" /&gt;&lt;/a&gt;
 
 
&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 5pt;line-height:normal;text-indent:0.5in;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;The first button renders
all the views available on the form, and the command used is listed as the&amp;nbsp;button&amp;#39;s text.&amp;nbsp; I used a rule to copy the value of the Result field of the
QdabraRules data source&amp;nbsp;to a file attachment control right after the RenderForm command is
run.&amp;nbsp; The filename that will appear in the file attachment control will
be rendered.htm since we did not specify any filename and because this is the
default filename.&amp;nbsp; We can view the form in a browser by right-clicking the
file attachment then saving it or by opening it directly.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 5pt;line-height:normal;"&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;(all
four images below are displayed in a single browser tab)&lt;/span&gt;&lt;/i&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;
 
&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;&lt;a href="http://www.infopathdev.com/blogs/mark_tienzo/AllView.jpg"&gt;&lt;img src="http://www.infopathdev.com/blogs/mark_tienzo/AllView.jpg" border="0" alt="" /&gt;&lt;/a&gt;
 
 
&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;The
second, third and fourth button renders only the view which is stated on the
label of the button, PAL view for the first button, Sort view for the second
button and NBA view for the third button. The filename will also be
rendered.htm for the three commands.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 5pt;line-height:normal;"&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;(all
three pictures below are viewed on separate tabs of the browser)&lt;/span&gt;&lt;/i&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;
 
&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;&lt;a href="http://www.infopathdev.com/blogs/mark_tienzo/View.jpg"&gt;&lt;img width="2042" height="471" style="width:1296px;height:364px;" src="http://www.infopathdev.com/blogs/mark_tienzo/View.jpg" border="0" alt="" /&gt;&lt;/a&gt;
 
 
&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;The fifth
button renders the PAL, Sort and NBA view only omitting the Render Form view
since it is not included in&amp;nbsp;the command.&amp;nbsp; The filename will also be
rendered.htm.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 5pt;line-height:normal;"&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;(images
are the same as the first button except the Render Form view is omitted)&lt;/span&gt;&lt;/i&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;The
sixth button renders the PAL view only but this time renames the filename to
PAL.htm instead of the default rendered.htm. We could also omit the
&amp;quot;/output=base64&amp;quot; since this is the default value for the command.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 5pt;line-height:normal;"&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;(this is
viewed from the preview of the Render Form after clicking the sixth button.&amp;nbsp; The
rendered view is the same as the result of&amp;nbsp;clicking the second button)&lt;/span&gt;&lt;/i&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;
 
&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;&lt;a href="http://www.infopathdev.com/blogs/mark_tienzo/WithFilename.jpg"&gt;&lt;img src="http://www.infopathdev.com/blogs/mark_tienzo/WithFilename.jpg" border="0" alt="" /&gt;&lt;/a&gt;
 
 
&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;For the
seventh and eighth button we used a different output type called &amp;quot;raw&amp;quot;.&amp;nbsp; This will not
give us an htm file that we can directly view in a browser but gives us the HTML code.&amp;nbsp; I used the text box to copy out the value of the Result field
of the QdabraRules data source.&amp;nbsp; This value can be copied to a text editor where you
can edit and save it as an htm file to view it in a browser.&amp;nbsp; We cannot specify a
filename because it would not be relevant here.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 5pt;line-height:normal;"&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;(this is
viewed while previewing of the form&amp;nbsp;after clicking&amp;nbsp;the
seventh button)&lt;/span&gt;&lt;/i&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&amp;nbsp;&lt;/span&gt;
 
&lt;a href="http://www.infopathdev.com/blogs/mark_tienzo/Raw.jpg"&gt;&lt;img src="http://www.infopathdev.com/blogs/mark_tienzo/Raw.jpg" border="0" alt="" /&gt;&lt;/a&gt;
 
 
&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:5pt 0in;line-height:normal;"&gt;&lt;span style="font-size:10pt;mso-fareast-font-family:Arial;mso-bidi-font-size:11.0pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 10pt;"&gt;&lt;span style="mso-fareast-font-family:Calibri;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;"&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=85689" width="1" height="1"&gt;</description></item><item><title>Interacting with DBXL from code: Qdabra.Dbxl.Client</title><link>http://www.infopathdev.com/blogs/jimmy/archive/2012/09/18/interacting-with-dbxl-from-code-qdabra-dbxl-client.aspx</link><pubDate>Mon, 17 Sep 2012 18:30:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:82740</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Occasionally, DBXL customers will ask us for assistance with interacting with DBXL from code.&amp;nbsp; Over the years, we&amp;#39;ve developed a few different utilities for using DBXL from code, and the one that we ourselves use the most often is the Qdabra.Dbxl.Client library.&lt;/p&gt;&lt;p&gt;The library can be obtained from the following download page:&lt;br /&gt;&lt;a href="http://www.infopathdev.com/files/folders/other_subjects/entry82744.aspx"&gt;http://www.infopathdev.com/files/folders/other_subjects/entry82744.aspx&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Qdabra.Dbxl.Client is a .NET library that provides a simple interface to all of DBXL&amp;#39;s web methods. Using it is quite simple.&lt;/p&gt;

&lt;p&gt;You can start off by instantiating an instance of the DbxlClient class, specifying the URL for your DBXL instance:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;DbxlClient client = new DbxlClient(&amp;quot;http://servername/QdabraWebService&amp;quot;);&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;once you&amp;#39;ve instantiated a DbxlClient instance with the above line, you can start using it to call webmethods.&amp;nbsp; A DbxlClient object has several properties, most of them corresponding to DBXL&amp;#39;s different web services.&lt;/p&gt;

&lt;p&gt;So for example, to use the Document Service&amp;#39;s GetDocument() method to retrieve a document, you could use the following:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;DocumentInfo docInfo;&lt;br /&gt;StatusInfo result = client.DbxlDocumentService.GetDocument(1234, out docInfo);&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We recommend checking the property values on the returned StatusInfo object to verify that the method call succeeded.&lt;/p&gt;

&lt;p&gt;Likewise, if you wanted to call the ReshredDocument() method in the DbxlAdmin web service, you could do the following:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;code&gt;StatusInfo result = client.DbxlAdmin.ReshredDocument(1234);&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That&amp;#39;s all there is to it!&lt;/p&gt;&lt;br /&gt;

&lt;p&gt;The Qdabra.Dbxl.Client library will attempt to connect to DBXL using the current user&amp;#39;s Windows Authentication credentials.&amp;nbsp; If your website uses some authentication other than Windows Authentication and it is unable to authenticate, a credential prompt will be shown prompting the user for credentials.&lt;/p&gt;

&lt;p&gt;If the user&amp;#39;s credentials are known ahead of time, they can be passed directly to the DbxlClient object by way of the Credentials parameter.&lt;/p&gt;

&lt;p&gt;It is also possible to disable the credential prompt by setting the DbxlClient object&amp;#39;s &lt;strong&gt;IsNoPromptMode&lt;/strong&gt; property to &lt;strong&gt;true&lt;/strong&gt;.&amp;nbsp; Doing so will cause the library to simply throw an exception if authentication should fail.&lt;/p&gt;&lt;br /&gt;

&lt;p&gt;So that&amp;#39;s pretty much all there is to know about Qdabra.Dbxl.Client.&amp;nbsp; How are you using code to interact with DBXL?&amp;nbsp; Let us know in the comments section.&lt;br /&gt;&lt;/p&gt;
&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=82740" width="1" height="1"&gt;</description></item><item><title>SharePoint Designer Workflow error due to variable in email body</title><link>http://www.infopathdev.com/blogs/ernesto/archive/2012/09/12/sharepoint-designer-workflow-error-due-to-variable-in-email-body.aspx</link><pubDate>Wed, 12 Sep 2012 14:12:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:82574</guid><dc:creator>ErnestoM</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Qdabra Software recently was faced with an error when creating a SharePoint Designer workflow. When sending an email, if you insert a variable into the body of the email, it fails to save or publish the workflow.&lt;/p&gt;&lt;p&gt;For example, if you add the following to the email body:&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/82568/original.aspx" height="228" width="806" alt="" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Then the following error comes up when trying to publish the workflow.&amp;nbsp; &lt;/p&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/82569/original.aspx" height="122" width="1070" alt="" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;If the variable is removed from the email’s body, there is no problem publishing the workflow.&lt;/p&gt;&lt;p&gt;Qdabra found a workaround for this:&lt;/p&gt;&lt;p&gt;1)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create a string workflow variable. I called mine BlankString.&lt;/p&gt;&lt;p&gt;2)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; After entering the variables in the email body, open the Properties tab for the email step.&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/82570/original.aspx" height="288" width="640" alt="" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;3)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Click on the Body textbox and then click the &lt;b&gt;...&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/82571/original.aspx" height="390" width="632" alt="" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;4)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Place the cursor after the text &amp;lt;/HTML&amp;gt;.&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/82572/original.aspx" height="570" width="654" alt="" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;5)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Click on Add or Change Lookup and insert the empty string variable.&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/82573/original.aspx" height="528" width="652" alt="" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;6)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Click OK and publish the workflow.&lt;/p&gt;&lt;p&gt;This simple change will allow you to publish the workflow without issues.&lt;br /&gt;&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=82574" width="1" height="1"&gt;</description><category domain="http://www.infopathdev.com/blogs/ernesto/archive/tags/SharePoint+2010+workflow/default.aspx">SharePoint 2010 workflow</category></item><item><title>Using the UserProfileService in your InfoPath forms on Office 365</title><link>http://www.infopathdev.com/blogs/anson/archive/2012/08/22/using-the-userprofileservice-in-your-infopath-forms-on-office-365.aspx</link><pubDate>Wed, 22 Aug 2012 17:33:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:81883</guid><dc:creator>Anson Hidajat</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Office 365 and the cloud has been all the buzz as of late.&amp;nbsp; You can&amp;#39;t go to any tech blog or news site without hearing about it at least once.&amp;nbsp; Well it all sounds great, but sometimes you&amp;#39;ll run into some unfortunate limitations that may break your solutions.&amp;nbsp; Once of these cases has to do with the UserProfileService and InfoPath forms.&amp;nbsp; Have you ever pulled in user info from AD using the UserProfileService?&amp;nbsp; Works great, right?&amp;nbsp; Now try doing the same thing on Office 365.... not so great.&amp;nbsp; You&amp;#39;ll encounter an error that says the form cannot connect to the web service.&amp;nbsp; Bummer.&amp;nbsp; What can I do?&lt;/p&gt;&lt;p&gt;qRules is your answer here.&amp;nbsp; One of the commands in v4.1 is to connect to the UserProfileService which you could only do via code in Office 365.&amp;nbsp; qRules makes it simpler by doing all the hard work for you.&amp;nbsp; That&amp;#39;s right... no code!&amp;nbsp; It&amp;#39;s pretty straightforward and you can just take your old workfing form, inject qRules, modify a few of the data connections and properties, then you&amp;#39;re good to go.&lt;/p&gt;&lt;p&gt;I created a short demo video that explains how to do accomplish this via qRules.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.youtube.com/watch?v=tjVvKFoX9dM&amp;amp;list=UUevFL_5LD2E2t9SxCle35iw&amp;amp;index=1&amp;amp;feature=plcp"&gt;http://www.youtube.com/watch?v=tjVvKFoX9dM&amp;amp;list=UUevFL_5LD2E2t9SxCle35iw&amp;amp;index=1&amp;amp;feature=plcp&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=81883" width="1" height="1"&gt;</description></item><item><title>XPath Tips and Tricks:  Rounding numbers to the nearest N</title><link>http://www.infopathdev.com/blogs/jimmy/archive/2012/08/10/xpath-tips-and-tricks-rounding-numbers-to-the-nearest-n.aspx</link><pubDate>Fri, 10 Aug 2012 06:25:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:81554</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Hello everyone,&lt;/p&gt;

&lt;p&gt;&amp;nbsp;This is the first post in (hopefully) a series of posts on handy formulas that you can use to codelessly boost your forms&amp;#39; functionality.&lt;/p&gt;

&lt;p&gt;A common question that comes up on our forums and elsewhere is: How do I round a number to the nearest [some number]?&amp;nbsp; &lt;br /&gt;XPath provides the useful round() function, but that only allows rounding to the nearest whole number.&amp;nbsp; What if you want to round to the nearest 100, or 5, or half?&lt;/p&gt;

&lt;p&gt;Luckily, round() enables us to use a simple formula to do this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;div style="color:purple;font-size:130%;"&gt;
&lt;p&gt;Round to the nearest N&lt;br /&gt;&lt;br /&gt;round(&lt;strong&gt;&lt;u&gt;value&lt;/u&gt;&lt;/strong&gt;&amp;nbsp;div &lt;em&gt;N&lt;/em&gt;) * &lt;em&gt;N&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;br /&gt;Here, &lt;strong&gt;&lt;u&gt;value&lt;/u&gt;&lt;/strong&gt; can be a single field in your form, or an entire formula whose result you want to round.&lt;/p&gt;

&lt;p&gt;So to round to the nearest 100:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;round(&lt;strong&gt;&lt;u&gt;value&lt;/u&gt;&lt;/strong&gt;&amp;nbsp;div 100)&amp;nbsp;* 100&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;to round to the nearest 5:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;round(&lt;strong&gt;&lt;u&gt;value&lt;/u&gt;&lt;/strong&gt;&amp;nbsp;div 5)&amp;nbsp;* 5&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;to round to the nearest 1/3:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;round(&lt;strong&gt;&lt;u&gt;value&lt;/u&gt;&lt;/strong&gt;&amp;nbsp;div (1 div 3))&amp;nbsp;* (1 div 3)&lt;/p&gt;

&lt;p&gt;(or mathematically simplified):&lt;/p&gt;

&lt;p&gt;round(&lt;strong&gt;&lt;u&gt;value&lt;/u&gt;&lt;/strong&gt;&amp;nbsp;* 3)&amp;nbsp;div 3&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It&amp;#39;s that simple.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;Another question that often comes up is how to round a value to N decimal places.&amp;nbsp; To do this, we can just apply the same concept:&lt;/p&gt;

&lt;blockquote&gt;
&lt;div style="color:purple;font-size:130%;"&gt;Round to N decimal places:&lt;/div&gt;

&lt;p&gt;round(&lt;strong&gt;&lt;u&gt;value&lt;/u&gt;&lt;/strong&gt;&amp;nbsp;div 10&lt;sup&gt;-N&lt;/sup&gt;)&amp;nbsp;* 10&lt;sup&gt;-N&lt;/sup&gt;&lt;br /&gt;&lt;br /&gt;which can be simplified to:&lt;/p&gt;

&lt;div style="color:purple;font-size:130%;"&gt;round(&lt;strong&gt;&lt;u&gt;value&lt;/u&gt;&lt;/strong&gt;&amp;nbsp;* 10&lt;sup&gt;N&lt;/sup&gt;)&amp;nbsp;div 10&lt;sup&gt;N&lt;/sup&gt;&lt;/div&gt;
&lt;/blockquote&gt;

&lt;p&gt;
So to round a value to 2 decimal places, you would use this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;round(&lt;strong&gt;&lt;u&gt;value&lt;/u&gt;&lt;/strong&gt; * 100)&amp;nbsp;div 100&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;to round a value to 4 decimal places:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;round(&lt;strong&gt;&lt;u&gt;value&lt;/u&gt;&lt;/strong&gt; * 10000) div 10000&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;br /&gt;&lt;br /&gt;As a final note, occasionally people want to round a value&amp;nbsp;&lt;strong&gt;up&lt;/strong&gt; or &lt;strong&gt;down&lt;/strong&gt; instead of to the closest number.&amp;nbsp; This is just as simple.&amp;nbsp; Simply modify the above formulas to replace &lt;strong&gt;round&lt;/strong&gt; with &lt;strong&gt;ceiling&lt;/strong&gt; to round &lt;strong&gt;up&lt;/strong&gt; or &lt;strong&gt;floor&lt;/strong&gt; to round &lt;strong&gt;down&lt;/strong&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Round up to the nearest 100&lt;/p&gt;

&lt;p&gt;ceiling(&lt;strong&gt;&lt;u&gt;value&lt;/u&gt;&lt;/strong&gt; div 100) * 100&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;br /&gt;Round down to the nearest 100&lt;/p&gt;

&lt;p&gt;floor(&lt;strong&gt;&lt;u&gt;value&lt;/u&gt;&lt;/strong&gt; div 100) * 100&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That&amp;#39;s it!&amp;nbsp; Enjoy!&lt;/p&gt;
&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=81554" width="1" height="1"&gt;</description></item><item><title>Add a dog ear to your form</title><link>http://www.infopathdev.com/blogs/mel_balsamo/archive/2012/07/23/add-a-dog-ear-to-your-form.aspx</link><pubDate>Mon, 23 Jul 2012 15:05:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:80882</guid><dc:creator>Mel Balsamo</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;From this:
&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/formsdesign/image01.png" height="114" width="1026" alt="" /&gt;&lt;/p&gt;&lt;p&gt;To this:
&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/formsdesign/image02.png" height="130" width="1061" alt="" /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;That looks like a &amp;quot;dog ear&amp;quot; to me, pretty much.
&lt;/p&gt;&lt;p&gt;Adding this requires a little knowledge with Adobe Photoshop, but the steps should be straight-forward. So, if you&amp;#39;re ready – grab the PSD file &lt;a href="http://www.infopathdev.com/blogs/mel_balsamo/files/QdHeader.psd"&gt;here&lt;/a&gt;.
&lt;/p&gt;&lt;p style="margin-left:18pt;"&gt;1. Open &lt;b&gt;QdHeader.psd&lt;/b&gt; in Adobe Photoshop.
&lt;/p&gt;&lt;p style="margin-left:18pt;"&gt;2. From the &lt;b&gt;Layers &lt;/b&gt;pane, select &lt;b&gt;Corner&lt;/b&gt;.
&lt;/p&gt;&lt;p style="margin-left:72pt;"&gt;
&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/formsdesign/image03.png" height="332" width="223" alt="" /&gt;&lt;/p&gt;&lt;p style="margin-left:36pt;"&gt;This will select the &amp;quot;dog ear&amp;quot; image from the canvas.
&lt;/p&gt;&lt;p style="margin-left:72pt;"&gt;
&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/formsdesign/image04.png" height="64" width="60" alt="" /&gt;&lt;/p&gt;&lt;p style="margin-left:18pt;"&gt;3. From the vertical toolbar menu, set the foreground color to your desired border color – let&amp;#39;s pick red for this example.
&lt;/p&gt;&lt;p style="margin-left:72pt;"&gt;
&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/formsdesign/image05.png" height="68" width="144" alt="" /&gt;&lt;/p&gt;&lt;p style="margin-left:18pt;"&gt;4. Select the paint bucket tool.
&lt;/p&gt;&lt;p style="margin-left:72pt;"&gt;
&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/formsdesign/image06.png" alt="" /&gt;&lt;/p&gt;&lt;p style="margin-left:18pt;"&gt;5. Click the border portion of the dog ear to color it.
&lt;/p&gt;&lt;p style="margin-left:72pt;"&gt;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/formsdesign/image07.png" alt="" /&gt;&amp;nbsp; &lt;span style="font-family:Wingdings;"&gt;&lt;/span&gt; &amp;nbsp;
&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/formsdesign/image08.png" alt="" /&gt;&lt;/p&gt;&lt;p style="margin-left:18pt;"&gt;6. Repeat the same steps for the right, left and top borders, selecting the layer first and then using the paint bucket tool to change the color.
&lt;/p&gt;&lt;p style="margin-left:18pt;"&gt;7. You can change the remaining yellow-colored portion of the &amp;quot;dog ear&amp;quot; to match your form view&amp;#39;s background color, like so
&lt;/p&gt;&lt;p style="margin-left:72pt;"&gt;
&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/formsdesign/image09.png" alt="" /&gt;&lt;/p&gt;&lt;p style="margin-left:18pt;"&gt;8. You can also change the gradient overlay color to match your desired theme:
&lt;/p&gt;&lt;p style="margin-left:36pt;"&gt;
&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/formsdesign/image10.png" height="131" width="1027" alt="" /&gt;&lt;/p&gt;&lt;p style="margin-left:18pt;"&gt;9. Finally, add your company logo, slogan, etc. to add branding to your form.
&lt;/p&gt;&lt;p style="margin-left:36pt;"&gt;
&amp;nbsp;&lt;img src="http://www.infopathdev.com/blogs/mel_balsamo/images/formsdesign/image11.png" alt="" /&gt;&lt;/p&gt;&lt;p style="margin-left:18pt;"&gt;10. That&amp;#39;s it! You can just save the file as an image and add it to your form.
&lt;/p&gt;&lt;p&gt;You should now have a very neat header for use in all your forms. Enjoy!&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=80882" width="1" height="1"&gt;</description></item><item><title>qRules RefreshSharePointListItems - Walkthrough for v4.2</title><link>http://www.infopathdev.com/blogs/hilary/archive/2012/07/05/qrules-refreshsharepointlistitems-walkthrough-for-v4-2.aspx</link><pubDate>Thu, 05 Jul 2012 21:49:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:80262</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;In version 4.2 of qRules, we made a number of changes to simplify the SubmitToSharePointList command. Those changes also impact the RefreshSharePointListItems command - in a good way, I&amp;#39;m glad to say. Like SubmitToSharePointList, you can now run the refresh command for multiple lists with a single rule action, and fewer parameters are required.&lt;/p&gt;
&lt;p&gt;In case you&amp;#39;ve not seen them, here are my blog posts on these changes thus far:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;&lt;a href="http://www.infopathdev.com/blogs/hilary/archive/2012/05/30/qrules-submittosharepointlist-command-changes-for-v4-2.aspx" target="_blank"&gt;qRules SubmitToSharePointList Command - Changes for v4.2&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;a href="http://www.infopathdev.com/blogs/hilary/archive/2012/05/30/qrules-submittosharepointlist-command-general-overview.aspx"&gt;qRules SubmitToSharePointList Command - General Mapping Overview&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;a href="http://www.infopathdev.com/blogs/hilary/archive/2012/05/30/qrules-submittosharepointlist-walkthrough-for-v4-2.aspx" target="_blank"&gt;qRules SubmitToSharePointList - Walkthrough for v4.2&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;a href="http://www.infopathdev.com/blogs/hilary/archive/2012/06/25/qrules-submittosharepointlist-walkthrough-for-v4-2-adding-attachments.aspx"&gt;qRules SubmitToSharePointList - Walkthrough for v4.2 - Working With Attachments&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;a href="http://www.infopathdev.com/blogs/hilary/archive/2012/06/27/qrules-submittosharepointlist-walkthrough-for-v4-2-working-with-existing-data-amp-submitting-a-single-mapping.aspx"&gt;qRules SubmitToSharePointList - Walkthrough for v4.2 - Working With Existing Data &amp;amp; Submitting a Single Mapping&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;In this post, I&amp;#39;ll be starting with the form we left off with on the &lt;em&gt;Working With Existing Data&lt;/em&gt; post - here&amp;#39;s a &lt;a href="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList3/qRules4.2SubmitToSharePointListProgress7.xsn"&gt;copy&lt;/a&gt; you can use. Keep in mind that my form &amp;amp; mapping is pointed to sites in my environment, so you&amp;#39;ll need to modify that, and it is using the current 4.2 trial version of qRules - which expires 9/15/2012. So, you&amp;#39;ll want to re-inject with a new trial if you are following this at a later date.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Basics&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;First off, in case you aren&amp;#39;t familiar with the refresh command - let&amp;#39;s talk about what it does and how it works. This command is always used with forms that are set up to use the SubmitToSharePointList command where a form field is set to maintain the SharePoint list item ID. The command should generally&amp;nbsp;be run with a rule on QdabraRules data source &lt;em&gt;&lt;u&gt;finshedLoading&lt;/u&gt;&lt;/em&gt; attribute - a condition should be used so that the rule only runs when that attribute is equal to true.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;When you submit your list items, SharePoint returns the newly created list item ID to the field you have specified via your mapping:&lt;br /&gt;&lt;img style="WIDTH:624px;HEIGHT:68px;" src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit2.png" width="624" height="68" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;If you look at your mapping.xml file in a text editor, you&amp;#39;ll see the &lt;em&gt;&lt;u&gt;IsId&lt;/u&gt;&lt;/em&gt; attribute is set to &amp;quot;true&amp;quot;:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList4/SubmitToShP1.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;On a successful submit, qRules is going to update the indicated field with the value of the associated list item ID - all items in a SharePoint list have a unique integer value in the ID column. By saving that value in the XML for your form, the next time the SubmitToSharePointList command runs, qRules can perform an update on the existing item rather than creating a duplicate. &lt;/p&gt;
&lt;p&gt;The RefreshSharePointListItems also leverages this field - it adds to your form the ability to update all your SharePoint list connected items with the latest data from the list, so your users can update either the XML &lt;em&gt;or &lt;/em&gt;the list - they&amp;#39;ll stay in sync when your XML is next opened. It also adds the ability to propagate deletes - both from the XML to the list and vice versa.&lt;/p&gt;
&lt;p&gt;This command has two modes - Report and Update. Because the command has the potential to delete or change data, the default mode is Report. That means you have to explicitly state that you want the list data to overwrite your form data.&lt;/p&gt;
&lt;p&gt;A new attribute has to be added to your fields where you are keeping your list item IDs - &lt;em&gt;&lt;u&gt;qRulesLastModified&lt;/u&gt;&lt;/em&gt;. This attribute stores the date and time the form data was last saved to the list. When the refresh command runs, qRules compares the XML date &amp;amp; time values with the Last Modified column for the list item. If the list item was updated more recently, qRules overwrites the form values, using the mapping.xml to know which column writes to which field.&lt;/p&gt;
&lt;p&gt;If there is an item in the XML that has a list item ID, but can&amp;#39;t be found in the list (and the command is run in Update mode), qRules deletes the data from the XML.&lt;/p&gt;
&lt;p&gt;When the RefreshSharePointListItems command first runs, it also creates a list of the items with SharePoint list item IDs currently in the form. When SubmitToSharePointList is next run, if any of those items have been deleted from the XML, they will also be deleted from the SharePoint list.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Back To Work&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Hopefully that explanation didn&amp;#39;t bore you to death or baffle you. But we&amp;#39;ll walk through it, and the background above might make what we are going to do seem a little less obscure, okay?&lt;/p&gt;
&lt;p&gt;Since we are picking up where we left off last time, our form already has fields for the list item IDs, and we have our submit commands set up. So the first thing we&amp;#39;ll do is add the &lt;em&gt;&lt;u&gt;qRulesLastModified&lt;/u&gt;&lt;/em&gt; attribute to those.&lt;/p&gt;
&lt;p&gt;When I created my schema, I referenced the &lt;em&gt;&lt;u&gt;ShPId&lt;/u&gt;&lt;/em&gt; node so that I could have same name in a number of locations:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList4/SubmitToShP2.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Referencing a node is simple - add the node in one location you want it. Then right click the node and select &lt;strong&gt;Reference&lt;/strong&gt;:&lt;br /&gt;&lt;strong&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList4/SubmitToShP3.png" alt="" /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In the next dialog, select the group you&amp;#39;d like to add the field to - simple as that.&lt;/p&gt;
&lt;p&gt;Now the cool part - I just have to add the &lt;em&gt;&lt;u&gt;qRulesLastModified&lt;/u&gt;&lt;/em&gt; attribute to one instance of my &lt;em&gt;&lt;u&gt;ShPId&lt;/u&gt;&lt;/em&gt; field, and they all get it:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList4/SubmitToShP5.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList4/SubmitToShP6.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Form Changes&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We first need to add an additional data source connection. qRules uses an &lt;a href="http://msdn.microsoft.com/en-us/library/dd587743(v=office.11).aspx"&gt;owssvr.dll&lt;/a&gt; data connection to return each item for refreshing in preview or in Filler. If deployed as a browser form, it uses the SharePoint object model - but since we are going to want to be able to preview and test our work, we are going to add an owssvr.dll data connection.&lt;/p&gt;
&lt;p&gt;The data connection is to an XML file, and the URL looks like this:&lt;br /&gt;&lt;a href="http://yourserver/yourweb/_vti_bin/owssvr.dll?Cmd=Display&amp;amp;List={guid}&amp;amp;XMLDATA=TRUE&amp;amp;noredirect=true"&gt;http://yourserver/yourweb/_vti_bin/owssvr.dll?Cmd=Display&amp;amp;List={guid}&amp;amp;XMLDATA=TRUE&amp;amp;noredirect=true&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Your URL needs to be valid so that you can create the data connection, but qRules will use the server URL from your mapping and the list GUID from your mapping (since, after all, that will be the server and list you submitted to).&lt;/p&gt;
&lt;p&gt;So, in my case, the URL I&amp;#39;ll use looks like this:&lt;br /&gt;&lt;a href="http://qshp2010/nw/_vti_bin/owssvr.dll?Cmd=Display&amp;amp;List={6E986BE0-F112-4F61-8931-C1891E239E74}&amp;amp;XMLDATA=TRUE&amp;amp;noredirect=true"&gt;http://qshp2010/nw/_vti_bin/owssvr.dll?Cmd=Display&amp;amp;List={6E986BE0-F112-4F61-8931-C1891E239E74}&amp;amp;XMLDATA=TRUE&amp;amp;noredirect=true&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The GUID is to my Customers list - again, during the refresh process, qRules will ignore the GUID in the URL and use the one from the mapping file instead, so all that matters is that the URL is valid. You can test your URL in the browser - depending on your browser, it will either return XML in the browser or give you an option to save the returned XML.&lt;/p&gt;
&lt;p&gt;We add a new XML data connection to the form:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList4/SubmitToShP8.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Use your owssvr.dll URL for the location:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList4/SubmitToShP9.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Be sure to select the &amp;quot;Access the data from the specified location&amp;quot; radio button:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList4/SubmitToShP10.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;And de-select the checkbox that queries the data on load:&lt;br /&gt;&lt;img style="WIDTH:460px;HEIGHT:186px;" src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList4/SubmitToShP11.png" width="460" height="186" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;You&amp;#39;ll notice I&amp;#39;ve named my data connection &amp;quot;Refresh&amp;quot; - name yours whatever you like, but as usual, we need the exact name, including the correct casing, for our command parameters.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Adding the Command&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now that we&amp;#39;ve added our &lt;em&gt;&lt;u&gt;qRulesLastModified&lt;/u&gt;&lt;/em&gt;&amp;nbsp;attribute and our data connection, we can add the command. We are going to put the rule for the command on the QdabraRules &lt;em&gt;&lt;u&gt;finishedLoading&lt;/u&gt;&lt;/em&gt; attribute, with the condition that the attribute is equal to true (see *Note* at end for some additional information on this):&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList4/SubmitToShP7.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;We set the &lt;em&gt;&lt;u&gt;Command&lt;/u&gt;&lt;/em&gt; node of the QdabraRules data source to the RefreshListItems command:&lt;br /&gt;&lt;em&gt;RefreshSharePointListItems /dsname=Refresh&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList4/SubmitToShP12.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Did you name your data source something else? If so, you&amp;#39;d need to use whatever your data connection&amp;#39;s name is for the /dsname parameter. If your mapping data connection is&amp;nbsp;named anything other than&amp;nbsp;&amp;quot;mapping&amp;quot;, you&amp;#39;ll need to include the mapping parameter as well:&lt;br /&gt;&lt;em&gt;RefreshSharePointListItems /dsname=Refresh /mapping=MyVeryFancyMappingFile&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList4/qRules4.2SubmitToSharePointListProgress8.xsn"&gt;Here&amp;#39;s&lt;/a&gt; a copy of my work in progress, in case you need it.&lt;/p&gt;
&lt;p&gt;As I mentioned earlier, the default mode for this command is Report - this means any changed items will be reported to the QdabraRules &lt;em&gt;&lt;u&gt;Results&lt;/u&gt;&lt;/em&gt; node. Put that node on your form so you can see the outcome.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Testing in Report Mode&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Guess what? We are already ready to test! Once you have the form set up to submit list items, adding refresh functionality isn&amp;#39;t much work. To test, we&amp;#39;ll preview and submit some items to our lists. We&amp;#39;ll save our XML that we created in preview, change some of our list items, and then preview again, using our existing XML so we can see what the report result is.&lt;/p&gt;
&lt;p&gt;So, preview your form, create or select a customer, and add some orders and order details:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList4/SubmitToShP13.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Submit your list items, using the submit button, and then use File --&amp;gt; Save As to save the completed XML. Close your form.&lt;/p&gt;
&lt;p&gt;You can open the XML in a text editor, and you&amp;#39;ll see that your list items have a SharePoint list item ID along with a value for the &lt;u&gt;&lt;em&gt;qRulesLastModified&lt;/em&gt;&lt;/u&gt; attribute:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList4/SubmitToShP14.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;We need to change some of our new list items from SharePoint - here&amp;#39;s my original details:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList4/SubmitToShP15.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;And their modifications:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList4/SubmitToShP16.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Set your form template up to preview with existing data, using the XML you saved in your earlier preview (how-to can be found &lt;a href="http://www.infopathdev.com/blogs/hilary/archive/2009/03/13/first-do-no-harm.aspx"&gt;here&lt;/a&gt;):&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList4/SubmitToShP17.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Remember, we have not included the /mode parameter at this point, so by default our refresh command will only report on changes. Preview your form again, and take a look at the &lt;em&gt;&lt;u&gt;Results&lt;/u&gt;&lt;/em&gt; field - you&amp;#39;ll find text like this:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList4/SubmitToShP18.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Testing in Update Mode&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Keeping your template set up to preview with your existing data, add the /mode parameter to your command:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList4/SubmitToShP19.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Preview again - this time, you&amp;#39;ll have the same report, but your items that you changed in SharePoint should be refreshed to match:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList4/SubmitToShP20.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Euw. Big ugly validation errors - what happened there? Well, my form has a data type of whole number for the Quantity field, but SharePoint is returning the data with decimals - that&amp;#39;s okay, I can take care of that with a rule on the Quantity field:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList4/SubmitToShP21.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Preview again, and:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList4/SubmitToShP22.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Deleting&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Leaving the preview open, where the&amp;nbsp;refresh command has already run, try deleting existing items and adding some new ones.&amp;nbsp;Remember, the deletes will occur when the SubmitToSharePointList command is executed, so be sure to click your submit button to&amp;nbsp;run the command.&amp;nbsp;Be sure you remove the path to the XML you&amp;#39;ve been previewing with before you close your template - otherwise, you will do what I &lt;em&gt;always&lt;/em&gt; do - delete the XML and be completely confused when your form refuses to preview.&lt;/p&gt;
&lt;p&gt;***********************&lt;/p&gt;
&lt;p&gt;That&amp;#39;s it! &lt;a href="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList4/qRules4.2SubmitToSharePointListProgress9.xsn"&gt;Here&amp;#39;s&lt;/a&gt; my final form if you want it.&amp;nbsp;The best part of the qRules 4.2 changes, I think, is that if I need to submit data from my form to another list (I&amp;#39;m sure people in your organization &lt;em&gt;never&lt;/em&gt; change requirements on you... ) I can export the mapping from my form, import it into the mapping tool, and add the list mapping. I just need to replace the mapping in my form with the new one, and with no other changes, my current submit and refresh commands will now include the new list. That makes changes easier and faster for the form developer, so hooray for that.&lt;/p&gt;
&lt;p&gt;***********************&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;*NOTE*: As you may already know, in InfoPath, rules run before code. qRules is code, of course, but code that is accessed via &lt;em&gt;rules&lt;/em&gt;. We want to make sure the qRules code has fully loaded prior to executing any commands. So, if you have a command you would like to run on a form load rule, you should instead run it on the &lt;em&gt;&lt;u&gt;finishedLoading&lt;/u&gt;&lt;/em&gt; attribute. The qRules code sets that attribute to true when it is fully loaded.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=80262" width="1" height="1"&gt;</description><category domain="http://www.infopathdev.com/blogs/hilary/archive/tags/qRules/default.aspx">qRules</category><category domain="http://www.infopathdev.com/blogs/hilary/archive/tags/SubmitToSharePointList/default.aspx">SubmitToSharePointList</category><category domain="http://www.infopathdev.com/blogs/hilary/archive/tags/RefreshSharePointListItems/default.aspx">RefreshSharePointListItems</category></item><item><title>qRules SubmitToSharePointList - Walkthrough for v4.2 - Working With Existing Data &amp; Submitting a Single Mapping</title><link>http://www.infopathdev.com/blogs/hilary/archive/2012/06/27/qrules-submittosharepointlist-walkthrough-for-v4-2-working-with-existing-data-amp-submitting-a-single-mapping.aspx</link><pubDate>Wed, 27 Jun 2012 17:33:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:79906</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;With qRules 4.2, we&amp;#39;ve introduced a major improvement to the SubmitToSharePointList command - especially if you have been submitting to multiple lists. The first walkthrough can be found &lt;a href="http://www.infopathdev.com/blogs/hilary/archive/2012/05/30/qrules-submittosharepointlist-walkthrough-for-v4-2.aspx"&gt;here&lt;/a&gt;, and then in &lt;a href="http://www.infopathdev.com/blogs/hilary/archive/2012/06/25/qrules-submittosharepointlist-walkthrough-for-v4-2-adding-attachments.aspx"&gt;this post&lt;/a&gt;, we talked about how to save attachments with our list items. Picking up where the second post left off, we are now going to modify our form to submit to one of the individual lists we&amp;#39;ve mapped. Thus far, we&amp;#39;ve only submitted to all the lists. Also, because I am frightfully lazy, we are going to start pulling some existing data into our form so we can edit it and update our existing customers. &lt;/p&gt;
&lt;p&gt;We&amp;#39;ll start with the same template we have been using for the previous two walkthroughs - mine is available &lt;a href="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/qRules4.2SubmitToSharePointListProgress2.xsn"&gt;here&lt;/a&gt;, if you&amp;#39;d like it. Keep in mind that my form &amp;amp; mapping&amp;nbsp;is pointed to sites in my environment, so you&amp;#39;ll need to modify that, and it is using the current 4.2 trial version of qRules - which expires 9/15/2012. So, you&amp;#39;ll want to re-inject with a new trial if you are following this at a later date.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Data Connections&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;First, we need to add&amp;nbsp;2 data connections to our form - one that we&amp;#39;ll use for a customer drop down, and the other that we&amp;#39;ll use to return all the data for a given customer. The first one, which I&amp;#39;ll call the CustomerNumber data connection,&amp;nbsp;is to the Customer list, and returns these columns:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList3/SubmitToShP3-1.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;I sorted by Company Name to make the drop down I&amp;#39;ll use this data for less annoying.&lt;/p&gt;
&lt;p&gt;Return data on load for this connection only:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList3/SubmitToShP3-2.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Now, create another data connection to the Customers list:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList3/SubmitToShP3-3.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Select&amp;nbsp;at least all of the columns that the form is mapped to submit data to. This time, deselect the checkbox to query data on load:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList3/SubmitToShP3-4.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Form Changes&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In my form, I&amp;#39;ve decided to let the user choose an existing customer or just fill in the fields if they want to create a new customer. I&amp;#39;ve added a drop down that is bound to the &lt;em&gt;&lt;u&gt;/my:myFields/my:Customer/my:ShpId&lt;/u&gt;&lt;/em&gt; field - you may recall from the earlier walkthough that when mapping, we can indicate a form field that will hold the SharePoint List item ID after a successful submit- we are going to leverage this field to allow our users to open a new form and edit existing customers.&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList3/SubmitToShP3-6.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Set the drop down to use the CustomerNumbers data source, with the ID for the value and the Company Name for the display:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList3/SubmitToShP3-7.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList3/qRules4.2SubmitToSharePointListProgress5.xsn"&gt;Here&amp;#39;s&lt;/a&gt; my form up to this point, in case I&amp;#39;ve lost anyone. &lt;/p&gt;
&lt;p&gt;After the user selects the Customer, we&amp;#39;ll need to query the Customers data source for that customer&amp;#39;s data and then populate the main data source nodes with those values&amp;nbsp;- this can be done with ordinary InfoPath rules. While this could be done with rules set on the &lt;u&gt;&lt;em&gt;ShPId&lt;/em&gt;&lt;/u&gt; field the drop down is bound to, that would make things slightly more complex for us - we&amp;#39;d need to make sure these rules don&amp;#39;t run when qRules is populating that field. So, for the purposes&amp;nbsp;of this walkthrough, I&amp;#39;m going to add a button and put these rules on the button. However, you have other options - like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;Bind the drop down to another field, and execute the rules from that field - be sure you also set the form field for the ID if you take this approach&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Have a helper field in a 2ds that set when the form is about to execute the SubmitToSharePointList command, and base conditions off the value of that field to prevent execution of rules when qRules sets the ID field for a new item&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;For my form - I&amp;#39;m going with a button.&lt;/p&gt;
&lt;p&gt;My first rule action&amp;nbsp;sets the Customers &lt;em&gt;query&lt;/em&gt; ID field:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList3/SubmitToShP3-8.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;To the value of the &lt;em&gt;&lt;u&gt;/my:myFields/my:Customer/my:ShpId&lt;/u&gt;&lt;/em&gt; field:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList3/SubmitToShP3-9.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Then, I execute the Customers query:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList3/SubmitToShP3-10.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Now, since the user selected the ID of the customer she wants, I could have returned all the customer data and used filtered XPath to get the values I want - and if you are using SharePoint &amp;amp; InfoPath 2007, this would be the approach you would probably take (or use the qRules FilterOwssvr command to get back just the single record you need). Since I only will have one record in my Customers data source, I don&amp;#39;t have to use filtered XPath to populate my other form values. That makes me happy.&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList3/SubmitToShP3-11.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;In&amp;nbsp;the rules above, I am setting main data source Customer group nodes to values from my Customers list.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Preview&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Time to check our work - preview the form, and select a customer from the drop down - does all the customer&amp;#39;s information get populated correctly?&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList3/SubmitToShP3-12.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;If not, check and make sure you are returning data to your Customers data source - and &lt;a href="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList3/qRules4.2SubmitToSharePointListProgress6.xsn"&gt;here&amp;#39;s&lt;/a&gt; my form in progress, in case you need to take a look at it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Submit a Single Mapping&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now that we have added the logic to pull an existing customer into the form, we can add a button to save just the user&amp;#39;s Customer changes. The big trick here is making sure that in the mapping we have identified a field to use for the ID:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList3/SubmitToShP3-13.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;And making sure we have in our form set that field to the SharePoint List item ID that we wish to update - in my form, I&amp;#39;ve done this by binding a drop down to the field ( &lt;em&gt;&lt;u&gt;/my:myFields/my:Customer/my:ShpId&lt;/u&gt;&lt;/em&gt;) and then using a data connection to my target list for the values - so that the user will be picking a valid item ID from the drop down.&lt;/p&gt;
&lt;p&gt;Our original submit command was:&lt;br /&gt;&lt;em&gt;SubmitToSharePointList /submit=ShPList&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;We then added to it for adding attachments in the last walkthrough. I&amp;#39;m not going to be adding attachments here, just editing my existing customer - so I only need to add the &lt;strong&gt;&lt;em&gt;mappingName&lt;/em&gt;&lt;/strong&gt; parameter to indicate which mapping I want to submit:&lt;br /&gt;&lt;em&gt;SubmitToSharePointList /submit=ShPList /mappingName=Customers&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m going to add a region to this customer, since it was missing when I pulled his information into my form:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList3/SubmitToShP3-14.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;After clicking my button with the qRules command on it, I can see the region has been added to the customer:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList3/SubmitToShP3-15.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;If you would like to verify that only the Customer is submitted, add an Order and use the command that submits only the Customer data - you&amp;#39;ll find the Customer is added / updated and the order is not. If you need my final form, &lt;a href="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList3/qRules4.2SubmitToSharePointListProgress7.xsn"&gt;here&lt;/a&gt; it is.&lt;/p&gt;
&lt;p&gt;***********************&lt;/p&gt;
&lt;p&gt;There you have it - you can make this more interesting by allowing the user to copy in Orders or Order Details - using CopyTable or Insert - so those could be updated. Of course, you&amp;#39;d probably be submitting the XML to a form library in a real form - so you would open the form to update the order. &lt;/p&gt;
&lt;p&gt;But what if someone changed the list item? What if you want your users to be able to edit from the form or the list, and you want to keep them in sync? Stay tuned - next up is a walkthrough on the RefreshSharePointListItems command!&lt;/p&gt;
&lt;p&gt;***********************&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.infopathdev.com/blogs/hilary/archive/2012/05/30/qrules-submittosharepointlist-walkthrough-for-v4-2.aspx"&gt;SubmitToSharePointList Walkthrough&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.infopathdev.com/blogs/hilary/archive/2012/06/25/qrules-submittosharepointlist-walkthrough-for-v4-2-adding-attachments.aspx"&gt;Working with Attachments&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.infopathdev.com/blogs/hilary/archive/2012/07/05/qrules-refreshsharepointlistitems-walkthrough-for-v4-2.aspx"&gt;RefreshSharePointListItems&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=79906" width="1" height="1"&gt;</description><category domain="http://www.infopathdev.com/blogs/hilary/archive/tags/qRules/default.aspx">qRules</category><category domain="http://www.infopathdev.com/blogs/hilary/archive/tags/SubmitToSharePointList/default.aspx">SubmitToSharePointList</category></item><item><title>qRules SubmitToSharePointList - Walkthrough for v4.2 - Working With Attachments</title><link>http://www.infopathdev.com/blogs/hilary/archive/2012/06/25/qrules-submittosharepointlist-walkthrough-for-v4-2-adding-attachments.aspx</link><pubDate>Mon, 25 Jun 2012 18:25:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:79832</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;In the previous &lt;a href="http://www.infopathdev.com/blogs/hilary/archive/2012/05/30/qrules-submittosharepointlist-walkthrough-for-v4-2.aspx"&gt;walkthrough&lt;/a&gt; for the SubmitToSharePointList changes, we submitted data to three lists, all with a single mapping, a single submit connection, and the new, much simplified command syntax. If you didn&amp;#39;t hang onto your form template from last time - &lt;a href="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/qRules4.2SubmitToSharePointListProgress2.xsn"&gt;here&amp;#39;s&lt;/a&gt; one that you can start with - mind you, the form is pointed to my development SharePoint sites, so just about everything will need to be repointed to your environment, but at least you won&amp;#39;t have to start all over. Also, this form is injected with a qRules trial - so if you download it after 9/15/2012, you&amp;#39;ll want to re-inject it to enable qRules again.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Form Changes&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;First, we will need to add a field to our form data source for attachments. I think I&amp;#39;m going to add that to my Customer - it seems like I may want to attach a filled out credit application, or some other file related to the customer:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-1.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve set the field to be repeating, since I want the user to be able to add multiple files.&lt;/p&gt;
&lt;p&gt;Now, I have a decision to make. There are two options when adding attachments to my list item - I can keep the file in my form XML &lt;em&gt;and&lt;/em&gt; add it to the list item in SharePoint &lt;strong&gt;or&lt;/strong&gt; I can simply upload the file to my list item and &lt;em&gt;remove&lt;/em&gt; it from the XML. Since I don&amp;#39;t want to keep the file in two places, I&amp;#39;m going to take the second option - I want qRules to remove the file from my form after saving it to my list item. &lt;/p&gt;
&lt;p&gt;To do that, all I have to do is add two attributes to my attachment node - &lt;em&gt;&lt;u&gt;qRulesLink&lt;/u&gt;&lt;/em&gt;&amp;nbsp;and &lt;em&gt;&lt;u&gt;qRulesFilename&lt;/u&gt;&lt;/em&gt;:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-2.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;The presence of these attributes on the attachment node indicates to qRules that you want to have the file removed after it has been uploaded (like the functionality of the&amp;nbsp;SaveToSharePoint command, only for a list instead of a library).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Mapping Changes&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Next, we need to modify our list mapping file to indicate that we have an attachment field. Now, if you have worked with the SubmitToSharePointList command before, you may have had to re-do your mapping each time you wanted to make a change. We&amp;#39;ve improved that experience in qRules 4.2 - we can now import our mapping into the mapping form.&lt;/p&gt;
&lt;p&gt;So, first save your changes to your form template. Then, from the &lt;strong&gt;&lt;em&gt;Data&lt;/em&gt;&lt;/strong&gt; tab of the Ribbon, select &lt;strong&gt;&lt;em&gt;Resource Files&lt;/em&gt;&lt;/strong&gt;:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-3.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;From the &lt;strong&gt;&lt;em&gt;Resource Files&lt;/em&gt;&lt;/strong&gt; dialog, click on your mapping.xml file:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-4.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;And click the &lt;strong&gt;&lt;em&gt;Export&lt;/em&gt;&lt;/strong&gt; button to save the file.&lt;/p&gt;
&lt;p&gt;Open the mapping tool from the &lt;strong&gt;&lt;em&gt;Start&lt;/em&gt;&lt;/strong&gt; menu:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-5.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Select the &lt;strong&gt;&lt;em&gt;Define Mapping&lt;/em&gt;&lt;/strong&gt; tab. There is a button toward the bottom - &lt;strong&gt;&lt;em&gt;Import Existing qRules Mapping&lt;/em&gt;&lt;/strong&gt; - click that:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-6.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;You&amp;#39;ll get a warning about the form deleting existing mappings, which you can click &lt;strong&gt;&lt;em&gt;OK&lt;/em&gt;&lt;/strong&gt; on, and then select the mapping file you just exported from your form. Your existing mapping will be imported - all that remains is to attach your template to the &lt;strong&gt;&lt;em&gt;Source XSN&lt;/em&gt;&lt;/strong&gt;&amp;nbsp;field - much better than remapping every time, don&amp;#39;t you think?&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-7.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;In the mapping to the &lt;strong&gt;&lt;em&gt;Customers&lt;/em&gt;&lt;/strong&gt; list, select &lt;strong&gt;&lt;em&gt;Add mapping&lt;/em&gt;&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-8.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Select the new Files node that was added earlier for the &lt;strong&gt;&lt;em&gt;Form Field&lt;/em&gt;&lt;/strong&gt; and click the &lt;strong&gt;&lt;em&gt;Show&lt;/em&gt;&lt;/strong&gt; button in the &lt;strong&gt;&lt;em&gt;Options&lt;/em&gt;&lt;/strong&gt; column:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-9.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Select the &lt;strong&gt;&lt;em&gt;Attachment&lt;/em&gt;&lt;/strong&gt; checkbox for the Files node mapping:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-10.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;And click the &lt;strong&gt;&lt;em&gt;Save as qRules Mapping &lt;/em&gt;&lt;/strong&gt;button at the bottom of the form to save the mapping.xml. If you maintain the same name as the original file you exported, you can simply re-add the file as a resource file - no need to walk through the data connection wizard again. From the &lt;strong&gt;&lt;em&gt;Data&lt;/em&gt;&lt;/strong&gt; tab of the Ribbon, select &lt;strong&gt;&lt;em&gt;Resource Files &lt;/em&gt;&lt;/strong&gt;again to open the &lt;strong&gt;&lt;em&gt;Resource Files&lt;/em&gt;&lt;/strong&gt; dialog. Click &lt;strong&gt;&lt;em&gt;Add&lt;/em&gt;&lt;/strong&gt; and navigate to the mapping file you just saved. InfoPath will prompt you:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-11.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;You want to replace the existing file, so leave the default selection and click &lt;strong&gt;&lt;em&gt;OK&lt;/em&gt;&lt;/strong&gt;. You shouldn&amp;#39;t have to modify your mapping data connection - the schema of the XML file will not have changed at all, simply the data. As an aside, you can always verify what file is used by your data connection in the &lt;strong&gt;&lt;em&gt;Data Connection &lt;/em&gt;&lt;/strong&gt;dialog:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-12.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Add a Data Connection&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We need to add a Receive data connection to the AddAttachment method of the SharePoint Lists web service. On the &lt;strong&gt;&lt;em&gt;Data&lt;/em&gt;&lt;/strong&gt; tab of the Ribbon, select &lt;em&gt;&lt;strong&gt;From Web Service &lt;/strong&gt;--&amp;gt; &lt;strong&gt;From SOAP Web Service&lt;/strong&gt;&lt;/em&gt;:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-13.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;The URL for the Lists web service is: &lt;a href="http://yourserver/_vti_bin/lists.asmx"&gt;&lt;strong&gt;http://YourServer/_vti_bin/lists.asmx&lt;/strong&gt;&lt;/a&gt; - replace &amp;quot;YourServer&amp;quot; with your actual server name. If in doubt, test your URL in a browser, making sure you get a page that looks like this:&lt;br /&gt;&lt;img style="WIDTH:250px;HEIGHT:256px;" src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit24.png" width="250" height="256" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;After entering the URL in the Data Connection Wizard, click &lt;strong&gt;Next&lt;/strong&gt; and select the AddAttachment method:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-14.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Click &lt;strong&gt;Next &lt;/strong&gt;- no need to set any of the query parameters, so click &lt;strong&gt;Next &lt;/strong&gt;again, then one more time - in the final screen of the dialog, deselect the &amp;quot;Automatically retrieve data when form is opened&amp;quot; checkbox and leave the default name for the data connection - you can name it something else if you like, but keep track of the name, because we will need it when we modify our command.&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-15.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Add&amp;nbsp;Controls to the Form&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Add controls to your form to allow the selection of files. I like to add a file picker and a hyperlink, with the file picker inside a section, and set to hide if the &lt;em&gt;&lt;u&gt;qRulesLink&lt;/u&gt;&lt;/em&gt; attribute is not blank. &lt;a href="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/qRules4.2SubmitToSharePointListProgress3.xsn"&gt;Here&amp;#39;s&lt;/a&gt; a copy of my work in progress, if you&amp;#39;d like to check it out. For the hyperlink, I am using the &lt;em&gt;&lt;u&gt;qRulesLink&lt;/u&gt;&lt;/em&gt; attribute for the link, and the &lt;em&gt;&lt;u&gt;qRulesFilename&lt;/u&gt;&lt;/em&gt; attribute for the display:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-16.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Modify the Command&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In the first walkthrough, we added a submit button to our form with the qRules command:&lt;br /&gt;&lt;em&gt;SubmitToSharePointList /submit=ShPList&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Now, we need to modify this command to include our attachment files when we submit to the Customer list:&lt;br /&gt;&lt;em&gt;SubmitToSharePointList /submit=ShPList /dsname=AddAttachment&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;If you named your AddAttachment data connection something different, you need to modify the command above to use the name of &lt;em&gt;your&lt;/em&gt; data connection:&lt;br /&gt;&lt;em&gt;SubmitToSharePointList /submit=ShPList /dsname=MySuperSpecialAttachmentDataConnection&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Remember, case cOunTs - you need to use the exact same spelling and casing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Test the Form&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As always, be sure you have the QdabraRules &lt;em&gt;&lt;u&gt;Error&lt;/u&gt;&lt;/em&gt; node somewhere you can see it prior to testing. Preview your form, add a new customer, and add some files for the customer. Click the Submit button:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-17.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;If everything is set up correctly, you&amp;#39;ll now have links in your form instead of files - and in your list item:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-18.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;You will have attachments.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Extra - Add Delete Logic!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So - this is all well and good. Provided your users never ever make mistakes.&lt;/p&gt;
&lt;p&gt;But every now and again, someone may attach and save the wrong file. It would certainly be nice to allow the user to delete the file from the form,&amp;nbsp;wouldn&amp;#39;t it?&lt;/p&gt;
&lt;p&gt;No qRules required for this - just add another data&amp;nbsp;connection to the DeleteAttachment method of the SharePoint Lists web service -&amp;nbsp;exactly the same way as you added the AddAttachment method above:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-19.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Don&amp;#39;t bother filling out any of the query parameters, and deselect the option to automatically execute the data connection on load (just like we did for the AddAttachment data connection).&lt;/p&gt;
&lt;p&gt;Add a button to your form next to your hyperlink control:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-20.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Add a conditional formatting rule to the button to hide it if the &lt;em&gt;&lt;u&gt;qRulesLink&lt;/u&gt;&lt;/em&gt; attribute is blank:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-21.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Add an action rule to the button. There are three fields we need to set in the DeleteAttachment data source &lt;em&gt;&lt;u&gt;queryFields&lt;/u&gt;&lt;/em&gt;:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-22.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;I like to get the &lt;u&gt;&lt;em&gt;listName&lt;/em&gt;&lt;/u&gt; from the mapping file. MSDN &lt;a href="http://msdn.microsoft.com/en-us/library/lists.lists.deleteattachment(v=office.12).aspx"&gt;states&lt;/a&gt;&amp;nbsp;that the &lt;u&gt;&lt;em&gt;listName&lt;/em&gt;&lt;/u&gt; parameter can be the list GUID or name. We have the GUID in our mapping file - it is&amp;nbsp;in the Customers mapping:&lt;br /&gt;&lt;img style="WIDTH:782px;HEIGHT:57px;" src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-23.png" width="782" height="57" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;So, I&amp;#39;ll set that field to the &lt;u&gt;&lt;em&gt;ListCollection&lt;/em&gt;&lt;/u&gt; node in my mapping file where the &lt;u&gt;&lt;em&gt;mappingName&lt;/em&gt;&lt;/u&gt; is equal to Customers:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-24.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Next, I set the &lt;u&gt;&lt;em&gt;listItemID&lt;/em&gt;&lt;/u&gt; parameter to the field I am storing my SharePoint item ID in - in this case, that would be &lt;em&gt;&lt;u&gt;/my:myFields/my:Customer/my:ShpId&lt;/u&gt;&lt;/em&gt;:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-25.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Then I set the url parameter to the &lt;em&gt;&lt;u&gt;qRulesLink&lt;/u&gt;&lt;/em&gt; attribute:&lt;br /&gt;&lt;img style="WIDTH:491px;HEIGHT:303px;" src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-26.png" width="491" height="303" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Don&amp;#39;t forget, we need to actually execute the query (I&amp;nbsp;&lt;em&gt;always&amp;nbsp;&lt;/em&gt;forget that rule action, leaving myself perplexed when my what-ever-it-is doesn&amp;#39;t work):&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-27.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;In a perfect world, our web service method would return some useful information to us - sadly, it doesn&amp;#39;t (or at least not anything that InfoPath is going to tell us about). If the query fails, any rule actions after it won&amp;#39;t run, so I generally work on the assumption that if my query succeeds, my attachment will have been deleted, and add two more rule actions to clear out the &lt;em&gt;&lt;u&gt;qRulesLink&lt;/u&gt; &lt;/em&gt;and &lt;em&gt;&lt;u&gt;qRulesFilename&lt;/u&gt;&lt;/em&gt; attributes.&lt;/p&gt;
&lt;p&gt;However, you do have some options for error handling.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;Use the qRules QueryData command to execute the DeleteAttachment query - it will handle any errors and return them to the QdabraRules &lt;em&gt;&lt;u&gt;QueryDataError&lt;/u&gt;&lt;/em&gt; node - you could then add some conditions around clearing the &lt;em&gt;&lt;u&gt;qRulesLink&lt;/u&gt;&lt;/em&gt; and &lt;em&gt;&lt;u&gt;qRulesFilename&lt;/u&gt;&lt;/em&gt; attributes&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Or, after executing the data connection, you could query the GetAttachmentCollection method of the Lists web service - check the value of the &lt;em&gt;&lt;u&gt;/dfs:myFields/dfs:dataFields/tns:GetAttachmentCollectionResponse/tns:GetAttachmentCollectionResult&lt;/u&gt;&lt;/em&gt; and see if it contains the value of the &lt;em&gt;&lt;u&gt;qRulesLink&lt;/u&gt;&lt;/em&gt; attribute&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;My final ruleset looks like this:&lt;br /&gt;&lt;img style="WIDTH:468px;HEIGHT:474px;" src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/SubmitToShP2-28.png" width="468" height="474" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve simply chosen to let InfoPath return a query error in this case - and I added a condition to only run if the SharePoint ID field is populated.&lt;/p&gt;
&lt;p&gt;***********************&lt;/p&gt;
&lt;p&gt;So, now our form submits to three related SharePoint lists. It can include attachments. The user can delete attachments. &lt;a href="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList2/qRules4.2SubmitToSharePointListProgress4.xsn"&gt;Here&amp;#39;s&lt;/a&gt; the final form, in case you want to take a look at any of the logic. Next up - submitting just specific mappings. Hang onto your form and your test site!&lt;/p&gt;
&lt;p&gt;***********************&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.infopathdev.com/blogs/hilary/archive/2012/05/30/qrules-submittosharepointlist-walkthrough-for-v4-2.aspx"&gt;SubmitToSharePointList Walkthrough&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.infopathdev.com/blogs/hilary/archive/2012/06/27/qrules-submittosharepointlist-walkthrough-for-v4-2-working-with-existing-data-amp-submitting-a-single-mapping.aspx"&gt;Submitting a Single Mapping / Updating Existing Data&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.infopathdev.com/blogs/hilary/archive/2012/07/05/qrules-refreshsharepointlistitems-walkthrough-for-v4-2.aspx"&gt;RefreshSharePointListItems&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=79832" width="1" height="1"&gt;</description><category domain="http://www.infopathdev.com/blogs/hilary/archive/tags/qRules/default.aspx">qRules</category><category domain="http://www.infopathdev.com/blogs/hilary/archive/tags/SubmitToSharePointList/default.aspx">SubmitToSharePointList</category><category domain="http://www.infopathdev.com/blogs/hilary/archive/tags/Attachments/default.aspx">Attachments</category></item><item><title>qRules 4.2 and useBrowserApi node</title><link>http://www.infopathdev.com/blogs/hilary/archive/2012/06/21/qrules-4-2-and-usebrowserapi-node.aspx</link><pubDate>Thu, 21 Jun 2012 17:38:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:79753</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;We are getting ever closer to releasing qRules 4.2 and I wanted to post briefly on a new node we&amp;#39;ve added to the QdabraRules data source - it is called useBrowserApi and has a default value of &amp;quot;false&amp;quot;.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s what it does and why it is there:&lt;/p&gt;
&lt;p&gt;With qRules 4.1, we modified a lot of the SharePoint related commands to use the SharePoint object model instead of web services if the form was opened in the browser. We added a node called useWebServices, just in case this change affected any forms upgraded from earlier versions of qRules. But the other day, we suddenly saw an issue where sometimes qRules was not correctly switching between the SharePoint object model code and the web service code, and this caused some issues in our Office 365 forms (which can&amp;#39;t fall back on using web services).&lt;/p&gt;
&lt;p&gt;That code has been addressed in 4.2 and we are now unable to reproduce the issue in our environments, however, it made sense to give form designers a way to switch this off and indicate that they would like to always use the SharePoint DLLs&lt;/p&gt;
&lt;p&gt;Now, if you ever have issues with a form failing in the browser because it is not using the SharePoint object model, you can set useBrowserApi to true in order to make the form always use the SharePoint object model based code.&lt;/p&gt;
&lt;p&gt;The logic, then, as of qRules 4.2, is as follows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;If the useBrowserApi node in qRules data source = true, we use the SharePoint DLLs.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;If not 1, and if Application.Environment.IsBrowser = true or Application.Environment.IsMobile = true, we check to see if the useWebServices node in the qRules data source is true:&lt;/div&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;If useWebServices = true, we do NOT use SharePoint DLLs&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;If useWebServices = false, we DO use SharePoint DLLs&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;li&gt;
&lt;div&gt;If not 1, and if not 2, we do NOT use SharePoint DLLs&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;If useBrowserApi is set to true, the SharePoint commands like SubmitToSharePoint will fail in Filler and in Preview - unless the form is opened on a machine with SharePoint installed, of course.&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=79753" width="1" height="1"&gt;</description></item><item><title>DBXL and SharePoint Document Sets</title><link>http://www.infopathdev.com/blogs/jo-anne_alfafara/archive/2012/06/06/dbxl-and-sharepoint-document-sets.aspx</link><pubDate>Wed, 06 Jun 2012 05:49:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:79261</guid><dc:creator>Jo-Anne Alfafara</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Have you ever used Document sets in SharePoint? Document Set is a feature in SharePoint 2010 that helps you manage a group of documents in a special kind of folder:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/79264/original.aspx" alt="" /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Some call Document Sets the “super folder”. If you dig more into this feature, you’ll find a broad range of capabilities for managing content – it can have unique folder attributes, metadata, workflows and what’s more – a great user interface! &lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/79265/original.aspx" alt="" /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;So, if you are a DBXL user and you want to utilize this feature and integrate with your document types, it can be done by using qRules to submit to DBXL. Follow the steps below:&lt;/p&gt;&lt;p&gt;1. Inject qRules in your form. (If you don’t have qRules yet, you can &lt;a href="http://www.qdabra.com/en/products/download/qRulesTrial.aspx"&gt;download&lt;/a&gt; a trial from our site)&lt;/p&gt;&lt;p&gt;2. Add a submit data connection to the DBXL Submit Document web service.&lt;/p&gt;&lt;blockquote&gt;&lt;blockquote&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/79266/original.aspx" alt="" /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;p&gt;3. Add a submit button and add a rule in your submit button that sets the value of qRules Command (/QdabraRules/Command) to:&lt;/p&gt;&lt;p&gt;concat(&amp;quot;SubmitToDbxl /submit=&amp;lt;name of submit data connection to DBXL&amp;gt; /doctype=&amp;lt;DocumentType Name&amp;gt; /name=&amp;quot;, &lt;u&gt;Name&lt;/u&gt;, &amp;quot; /author=&amp;quot;, &lt;u&gt;Author&lt;/u&gt;, &amp;quot; /desc=&amp;quot;, &lt;u&gt;Description&lt;/u&gt;)&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Note:&lt;/em&gt;&lt;/strong&gt; Name, Author, and Description are fields in the form. You can change it to any fields that you want to map to DBXL.&lt;/p&gt;&lt;blockquote&gt;&lt;blockquote&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/79267/original.aspx" alt="" /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;p&gt;4. Add a submit data connection to your SharePoint Document Set. For the file name, select Result field from the QdabraRules schema and check allow overwrite if file exists. The reason why you’ll be using Result is because we want the file name to be unique, and the Result field in qRules contains the DocID of the document submitted in DBXL.&lt;/p&gt;&lt;blockquote&gt;&lt;blockquote&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/79268/original.aspx" alt="" /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;p&gt;5. Click on your button and add a new action that submits data using the submit data connection to your document set. Make sure that you add it after the qRules action that submits to DBXL. &lt;/p&gt;&lt;blockquote&gt;&lt;blockquote&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/79273/original.aspx" alt="" /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;p&gt;6. Save the form.&lt;/p&gt;&lt;p&gt;7. If your SharePoint is not sandbox enabled, you need to publish the form as admin approved template and activate it to your site collection.&lt;/p&gt;&lt;p&gt;8. After you have activated the form in the site collection, go to the Document Set folder and click Library tab &amp;gt; Library Settings &amp;gt; Document Set (under Content Types).&lt;/p&gt;&lt;blockquote&gt;&lt;blockquote&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/79269/original.aspx" alt="" /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;p&gt;9. Click Document Set settings.&lt;/p&gt;&lt;blockquote&gt;&lt;blockquote&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/79270/original.aspx" alt="" /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;p&gt;10. Select the form from Available Site Content Types and click Add. Click OK.&lt;/p&gt;&lt;blockquote&gt;&lt;blockquote&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/79271/original.aspx" alt="" /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;p&gt;11. Now when you go back to the main form library page and create a new Document Set, the form should be available when you select from Documents tab &amp;gt; New Document of that Document Set folder.&lt;/p&gt;&lt;blockquote&gt;&lt;blockquote&gt;&lt;p&gt;&lt;img src="http://www.infopathdev.com/photos/blog_pictures/images/79272/original.aspx" alt="" /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;p&gt;12. You also need to attach the activated form in DAT. To do that, open DAT and click Edit Configuration for your document type. In the General tab, attach the activated form. You can enter the full URL to attach the form or you can also download the activated form from your site and attach that. After doing so, click Save in DAT.&lt;/p&gt;&lt;p&gt;&lt;em&gt;Test document submit:&lt;/em&gt;&lt;/p&gt;&lt;p&gt;1. In your document set, click Documents tab &amp;gt; New Document.&lt;/p&gt;&lt;p&gt;2. Select the content type.&lt;/p&gt;&lt;p&gt;3. Fill out the form and submit.&lt;/p&gt;&lt;p&gt;The form will be submitted to the SharePoint document set and DBXL. You can also try editing the form from your document set and you’ll see the changes reflected in DBXL.&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=79261" width="1" height="1"&gt;</description></item><item><title>Use InfoPath to Teach Yourself XPath</title><link>http://www.infopathdev.com/blogs/hilary/archive/2012/05/31/use-infopath-to-teach-yourself-xpath.aspx</link><pubDate>Thu, 31 May 2012 16:14:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:79112</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;I&amp;#39;m working on a blog post that includes a mention of relative XPath, and rather than just continue adding info to that post (thus possibly creating the longest blog entry ever in the history of the world), I thought I&amp;#39;d include this tip on its own.&lt;/p&gt;
&lt;p&gt;When I am unsure of the XPath I need for an expression, I leverage InfoPath, and you can too. Here&amp;#39;s how:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;Find the field or group you need to get the relative path from:&lt;br /&gt;&lt;img style="WIDTH:260px;HEIGHT:293px;" src="http://www.infopathdev.com/blogs/hilary/LevIP/LevIP1.png" width="260" height="293" alt="" /&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Add a rule to it - I usually add a conditional formatting rule, but since we are going to delete the rule when we are done, it really doesn&amp;#39;t matter what type of rule you use.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Create a condition - for the first drop down, select the field you need the relative path to:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/LevIP/LevIP2.png" alt="" /&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Change the first drop down to &amp;quot;The expression&amp;quot;:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/LevIP/LevIP3.png" alt="" /&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Voilà! You have a relative XPath!&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/LevIP/LevIP4.png" alt="" /&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Now you can just delete your rule. For more complex expressions, you can use the third drop down, and select&amp;nbsp;&amp;quot;Use a formula&amp;quot; - and check the Edit Xpath box in the formula editor. Get in the habit at looking at the actual XPath InfoPath is using, and you&amp;#39;ll be surprised how much XPath knowledge you pick up.&amp;nbsp;&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=79112" width="1" height="1"&gt;</description><category domain="http://www.infopathdev.com/blogs/hilary/archive/tags/XPath/default.aspx">XPath</category><category domain="http://www.infopathdev.com/blogs/hilary/archive/tags/InfoPath/default.aspx">InfoPath</category></item><item><title>qRules SubmitToSharePointList - Walkthrough for v4.2</title><link>http://www.infopathdev.com/blogs/hilary/archive/2012/05/30/qrules-submittosharepointlist-walkthrough-for-v4-2.aspx</link><pubDate>Thu, 31 May 2012 00:37:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:79076</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;qRules 4.2 is coming soon, and with it - big changes to the SubmitToSharePointList command! But wait - don&amp;#39;t panic - if you have a 4.1 injected form that is doing what you need, the command is backward compatible. You&amp;#39;ll be able to inject with 4.2 and use all the awesome new string, math and financial commands without worrying about making any changes to your SubmitToSharePointList command. &lt;/p&gt;
&lt;p&gt;Since the last walkthrough I did on this command was way back when we introduced it, I thought it was about time for a re-do. I&amp;#39;ve got another blog &lt;a href="http://www.infopathdev.com/blogs/hilary/archive/2012/05/30/qrules-submittosharepointlist-command-changes-for-v4-2.aspx" target="_blank"&gt;post&lt;/a&gt; that talks in general terms about the changes we&amp;#39;ve made, and &lt;a href="http://www.infopathdev.com/blogs/hilary/archive/2012/05/30/qrules-submittosharepointlist-command-general-overview.aspx"&gt;one&lt;/a&gt; that explains the mapping file in more detail than you probably really want, so take a look at those if you are interested in any of the nitty gritty details.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s a &lt;a href="http://blog.sharepointbits.com/2011/04/sharepoint-2010-northwind-sample.html" target="_blank"&gt;link&lt;/a&gt; to my very favorite SharePoint template, and one that I plan to use for this walkthrough - If you are like me and the Northwind data makes you a little misty, you&amp;#39;ll love this SharePoint template - it comes pre-loaded with Northwind data! We will be using the Customers, Orders and Order Details lists - our form will use qRules to submit to all three of them, with just one submit connection, and just one mapping file! Fasten your seatbelts, and here we go ....&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Form&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;First, we&amp;#39;ll create a simple form. In case you&amp;#39;d be happier not having to do this yourself, you can find my form &lt;a href="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/qRules4.2SubmitToSharePointList.xsn"&gt;here&lt;/a&gt; - just a warning, it is pretty bare bones, we&amp;#39;ll add to it as we go along. Oh, if you are wondering how I was able to add multiple fields with the same name - I added a reference to the field in the Data Source Task Pane. You can learn a bit more about that &lt;a href="http://office.microsoft.com/en-us/infopath-help/add-a-field-or-group-HP001096752.aspx" target="_blank"&gt;here&lt;/a&gt;, or towards the end of your qRules user guide.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s my schema:&lt;br /&gt;&lt;img width="241" height="501" style="width:241px;height:501px;" src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit6.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;The Customer, Employee and Ship Via&amp;nbsp;columns in my SharePoint Orders list&amp;nbsp;are lookups&amp;nbsp;- we&amp;#39;ll have to handle those specially. So is the Product column in the Order Details list.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Mapping&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;First, we&amp;#39;ll create our mapping file. If you have not already installed the InfoPath to SharePoint List Tool form that comes with qRules, you&amp;#39;ll want to do that first - you can find more info starting on about page 3 of your qRules user guide.&lt;/p&gt;
&lt;p&gt;Open the mapping tool:&lt;br /&gt;&lt;img width="224" height="215" style="width:224px;height:215px;" src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit7.png" alt="" /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;: In qRules 4.3, we changed the installation process for the full trust forms. If you are using v4.3 or later, you&amp;#39;ll see this in your start menu:&lt;br /&gt;&lt;img width="209" height="176" style="width:209px;height:176px;" src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/1.png" alt="" /&gt;&lt;/p&gt;&lt;p&gt;Clicking on qRules Forms in the start menu opens a folder:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/2.png" alt="" /&gt;&lt;/p&gt;&lt;p&gt;The mapping tool is there, along with an installer for the form and instructions on how to install the form. Once the form has been installed, you can either access it directly from the folder, or by opening InfoPath Filler and opening the form from there:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/3.png" alt="" /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Under the &lt;strong&gt;&lt;em&gt;Define Mapping&lt;/em&gt;&lt;/strong&gt; tab, attach your XSN file and enter your SharePoint URL:&lt;br /&gt;&lt;img width="820" height="230" style="width:820px;height:230px;" src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit8.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Click the &lt;strong&gt;&lt;em&gt;Get SharePoint Lists&lt;/em&gt;&lt;/strong&gt; button to expand the &lt;strong&gt;&lt;em&gt;Mapping Definition&lt;/em&gt;&lt;/strong&gt; section of the form and allow you to pick the lists you wish to map to.&lt;/p&gt;
&lt;p&gt;In qRules 4.2, our lists will be submitted to in the order they are mapped. In our form, the parent list is the Customers list, then the Orders list, and finally, the Order Details list. So, we will map our data in that order. Also, in our form, the Customer is not repeating, but we can have multiple orders and multiple order details.&lt;/p&gt;
&lt;p&gt;First, we&amp;#39;ll map our customer information. Select the Customers list from the SharePoint List drop down control:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit9.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Click the &lt;strong&gt;...&lt;/strong&gt; button next to the FormField:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit10.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;This will display the form fields in the task pane:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit11.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Double click the ShPId field. We are going to use this field for the Customers list item id. It doesn&amp;#39;t get mapped to a column - on a successful submit, qRules will populate it with the newly created item&amp;#39;s id, so we can update our list item from our form. Click the &lt;strong&gt;&lt;em&gt;Show&lt;/em&gt;&lt;/strong&gt; button in the &lt;strong&gt;Options &lt;/strong&gt;column, and select Id - your first column mapping will look like this:&lt;br /&gt;&lt;img width="625" height="93" style="width:625px;height:93px;" src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit12.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Map the rest of the fields - these are all from the Customer group in my form template schema:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit13.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Click the widget to insert another SharePoint Mapping - we are now going to map the Orders group to the Orders list:&lt;br /&gt;&lt;img width="327" height="26" style="width:327px;height:26px;" src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit14.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;We want to map our lists in the order we want them to submit, as I mentioned above, since qRules will process the mapping file sequentially (unless we specify the /mappingName parameter in the command). Because we want to submit our new Customer list item id with our Order for the Customer lookup, we want the Customer mapping to submit first, so the field we&amp;#39;ve indicated as the id is populated prior to submitting the Order.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s my partially completed Order mapping:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit15.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;I have only filled out the Form Fields that can be selected using the field picker task pane at this point. This is a repeating group, so I have indicated that, and selected the group in the &lt;strong&gt;Repeating Group&lt;/strong&gt; field.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m going to enter the XPath for the remaining mappings by hand - that&amp;#39;s because they need to be &lt;em&gt;relative&lt;/em&gt; to the repeating group itself. &lt;/p&gt;
&lt;p&gt;My repeating group is: &lt;em&gt;my:myFields/my:Customer/my:Orders/my:Order&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The other information I want is in my Customer group - I have to go up the tree twice: ../../&lt;/p&gt;
&lt;p&gt;That takes me from my:Order back up to my:Orders (../) and then again back up to my:Customer (../). When in doubt, let InfoPath figure it out - if I need a relative XPath and am not sure what it would be, I leverage InfoPath - here&amp;#39;s a short &lt;a href="http://www.infopathdev.com/blogs/hilary/archive/2012/05/31/use-infopath-to-teach-yourself-xpath.aspx"&gt;post&lt;/a&gt; on that.&lt;/p&gt;
&lt;p&gt;Now, I realize that my form may be working from an unrealistic conceit, but for my scenario, my Customer address information will be my Shipping Address information. My finished mapping, then, once I have carefully hand typed the relative paths to my Customer info, looks like this:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit16.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Notice I&amp;#39;m going to submit the ShpId field for the Customer to the Customer column in my Order list? That is because to set the value for a lookup column, I need to submit the item&amp;#39;s id. When my customer is created in the Customers list, that field (&lt;em&gt;/my:myFields/my:Customer/my:ShpId&lt;/em&gt;) will be populated with the new customer id. To link my Order to my Customer, I&amp;#39;ll want to submit that very same id to the Customer column in my Orders list.&lt;/p&gt;
&lt;p&gt;Finally, we insert yet another SharePoint mapping for the template - this time, I&amp;#39;ll be mapping to the Order Details list:&lt;br /&gt;&lt;img width="639" height="409" style="width:639px;height:409px;" src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit17.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;This time, I&amp;#39;m including a relative path to the OrderNumber field - while my list has an Order Number column, it is not a lookup. Thus, I want to submit the actual OrderNumber value, not the id of the Order list item. &lt;/p&gt;
&lt;p&gt;Finally, click the &lt;strong&gt;Save as qRules Mapping&lt;/strong&gt; button:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit18.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;The saved mapping will default the name to mapping.xml - I usually just leave that as is. In case you&amp;#39;d like it, my mapping is available &lt;a href="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/mapping.xml"&gt;here&lt;/a&gt; - keep in mind that even if you are using the same SharePoint template, your URL and list GUIDs will be different from mine.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Data Connections&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now we will add our mapping file, mapping data connection, and submit data connection to our form. I have a rather specific way I like to add my XML resource files - I like to implicitly add the resource file instead of letting InfoPath do it, as InfoPath strips off the XML file extension when it &amp;quot;helps&amp;quot; you - since my mapping data connection schema won&amp;#39;t change, if I add the resource file myself it makes it simpler when I decide to change the mapping.&lt;/p&gt;
&lt;p&gt;From InfoPath, select the &lt;strong&gt;Data&lt;/strong&gt; tab on the Ribbon, then &lt;strong&gt;From Other Sources&lt;/strong&gt; --&amp;gt; &lt;strong&gt;From XML File&lt;/strong&gt;:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit19.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Click the &lt;strong&gt;Resource Files&lt;/strong&gt; button:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit20.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Click the &lt;strong&gt;Add&lt;/strong&gt; button in the Resource Files dialog, and select the mapping.xml saved earlier:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit21.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Click &lt;strong&gt;OK&lt;/strong&gt;, then &lt;strong&gt;Next &lt;/strong&gt;and &lt;strong&gt;Finish&lt;/strong&gt; - the default name for your mapping data connection will be &lt;strong&gt;mapping&lt;/strong&gt; - just leave that as is, and leave the checkbox to load data on open selected. In the data connections dialog, the details for your data connection should look like this:&lt;br /&gt;&lt;img width="529" height="490" style="width:529px;height:490px;" src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit22.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Next, we need to add a Submit data connection to the UpdateListItems method of the SharePoint Lists web service. On the &lt;strong&gt;Data&lt;/strong&gt; tab of the Ribbon, select &lt;strong&gt;To Other Locations &lt;/strong&gt;--&amp;gt; &lt;strong&gt;To Web Service&lt;/strong&gt;:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit23.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;The URL for the Lists web service is: &lt;a href="http://yourserver/_vti_bin/lists.asmx"&gt;&lt;strong&gt;http://YourServer/_vti_bin/lists.asmx&lt;/strong&gt;&lt;/a&gt;&amp;nbsp;- replace &amp;quot;YourServer&amp;quot; with your actual server name. If in doubt, test your URL in a browser, making sure you get a page that looks like this:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit24.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;After entering the URL in the Data Connection Wizard, click &lt;strong&gt;Next&lt;/strong&gt; and select the UpdateListItems method:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit25.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Click &lt;strong&gt;Next &lt;/strong&gt;again and leave the parameters blank in the following dialog - just click &lt;strong&gt;Next&lt;/strong&gt;&amp;nbsp;and &lt;strong&gt;Yes&lt;/strong&gt; on the warning:&lt;br /&gt;&lt;img width="813" height="134" style="width:813px;height:134px;" src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit5.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;qRules will populate the data for the submit parameters. In the final window, I usually deselect the checkbox for using the connection as the submit default, and I generally give my connection a simpler name:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit26.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Make a note of the name you use - including the casing - as you will need it for your command.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Handling Special Fields&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I mentioned earlier that we would need to handle the lookup fields in a special manner - we need to make sure we are submitting valid list item ids for those fields. So, we need to add data connections in our form to the following lists:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;Employees&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Products&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Shippers&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;You can use the &lt;strong&gt;From SharePoint List&lt;/strong&gt; button on the &lt;strong&gt;Data &lt;/strong&gt;tab of the Ribbon to create these connections. Be sure you select the ID field as well as whatever field you&amp;#39;d like to use for display in a drop down - like the Employee Name, Product Name or Company Name. After all your data connections have been created, your form&amp;#39;s Data Connections will look like this:&lt;br /&gt;&lt;img width="345" height="252" style="width:345px;height:252px;" src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit27.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;If you need help creating a SharePoint List data connection, here&amp;#39;s an Office Online &lt;a href="http://office.microsoft.com/en-us/infopath-help/add-a-data-connection-to-a-sharepoint-document-library-or-list-HP010093160.aspx"&gt;article&lt;/a&gt; that may be of use.&lt;/p&gt;
&lt;p&gt;In the form, we&amp;#39;ll use these new data connections as data sources for drop down controls - we need to use drop downs for the Employee, Ship Via and Product fields:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit28.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/qRules4.2SubmitToSharePointListProgress1.xsn"&gt;Here&amp;#39;s&lt;/a&gt; my form thus far, in case you need it - the important thing to remember is that the &lt;strong&gt;&lt;em&gt;value&lt;/em&gt;&lt;/strong&gt; for these drop down controls needs to be the list item id:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit29.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;When we test our command, I&amp;#39;ll show you what happens if we submit incorrect data to a lookup - I know you won&amp;#39;t want to miss that!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Add the qRules SubmitToSharePointList Command&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Oh, finally. We are at that point where we can add our command. And guess what? This will be the shortest section of the entire blog post. First, you&amp;#39;ll need to inject your template with qRules. Save and close your form template, and from the &lt;strong&gt;Start&lt;/strong&gt; menu, navigate to Qdabra / Tools and find your qRules folder - open the injector and inject your form. If you need more detail, qRules installs with a &lt;strong&gt;&lt;em&gt;Quick Start&lt;/em&gt;&lt;/strong&gt; guide that you&amp;#39;ll find helpful.&lt;/p&gt;
&lt;p&gt;After injecting, open your form in design mode, add a button to your form, and add an action rule to the button:&lt;br /&gt;&lt;img width="241" height="148" style="width:241px;height:148px;" src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit30.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;The Action should set the &lt;strong&gt;&lt;em&gt;Command&lt;/em&gt;&lt;/strong&gt; node in the &lt;strong&gt;&lt;em&gt;QdabraRules&lt;/em&gt;&lt;/strong&gt; data source:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit31.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;The value we will set the &lt;strong&gt;Command&lt;/strong&gt; node to is:&lt;br /&gt;&lt;em&gt;SubmitToSharePointList /submit=ShPList&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit32.png" alt="" /&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Remember several thousand words ago, when I suggested you make note of the name of your UpdateListItems method data connection? This is why - the value to the right of the &amp;quot;=&amp;quot; sign needs to be the exact name of your SharePoint Lists web service data connection - including the casing. So, if yours is named &lt;strong&gt;MyFancySharePointSubmit&lt;/strong&gt; your command would be &lt;em&gt;SubmitToSharePointList /submit=MyFancySharePointSubmit&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m also assuming you followed along and left your mapping data connection named &lt;strong&gt;mapping&lt;/strong&gt; - if it is named anything else, you&amp;#39;ll need to include the /mapping parameter (&lt;em&gt;SubmitToSharePointList /submit=MyFancySharePointSubmit /mapping=MyMappingThatIRenamedToBeDifficultAboutThings&lt;/em&gt;&amp;nbsp; for example).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Test Your Form!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;First, from the QdabraRules data source, drag the &lt;strong&gt;Error&lt;/strong&gt; node onto your form:&lt;br /&gt;&lt;img width="668" height="52" style="width:668px;height:52px;" src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit33.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;You can also drag the Success node onto the form if you like.&lt;/p&gt;
&lt;p&gt;Then, preview the form. Fill out some data:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit34.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;And click the Submit button.....&lt;/p&gt;
&lt;p&gt;If the Error node is blank (and Success is checked as true), go take a look at your lists, and do a little happy dance at your desk (it&amp;#39;s okay, I won&amp;#39;t tell anyone).&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s what my lists look like -&lt;/p&gt;
&lt;p&gt;Customers:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit35.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Orders:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit36.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Order Details:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit37.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Hang onto your form - we&amp;#39;ll use it again in some future blog posts. We still haven&amp;#39;t talked about adding attachments or refreshing our form data, and I&amp;#39;ve not even mentioned updating.... So much to say, so little space. But, before you race off to other, more exciting blogs, one last thing....&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Troubleshooting&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;What if your form didn&amp;#39;t submit? You have an error? Let&amp;#39;s take a look at an issue I mentioned earlier - that your data won&amp;#39;t submit if you have invalid values submitting to a lookup.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve added the ShipVia field to my form again, but as a text box:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit38.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll fill out the form partially - and deliberately put bad data in that field:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit39.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;When I click my button, I get an error:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit40.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;That little gem is courtesy of SharePoint - not too helpful, is it.&amp;nbsp;When I get errors like this, I usually do a web search with the error message and the name of the web method (UpdateListItems) - generally I can find enough clues to get me headed down the right path. For the sake of future searches - &lt;strong&gt;&lt;em&gt;The operation failed because an unexpected error occurred. (Result Code: 0x80020005)&lt;/em&gt;&lt;/strong&gt;&amp;nbsp;from the UpdateListItems method may mean you are trying to set a lookup column to an invalid value! &lt;/p&gt;
&lt;p&gt;Be sure to search this forum on errors as well, and if you have an issue you can&amp;#39;t resolve, create a new thread in the &lt;a href="http://www.infopathdev.com/forums/131.aspx"&gt;qRules forum&lt;/a&gt;, so we can help you get it figured out.&lt;/p&gt;
&lt;p&gt;***********************&lt;/p&gt;
&lt;p&gt;Hey, I did a video walkthrough on this - you can find that &lt;a href="http://youtu.be/A2ZpxZF8we0"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;More posts coming soon on adding attachments to our list items, updating existing list items from InfoPath, refreshing the list items in our form, submitting only specific mappings, and other diverse topics of interest. Hang onto your form from this walkthrough, since I&amp;#39;ll be using the same form for these future posts. I hope you are as excited about qRules 4.2 as I am!&lt;/p&gt;
&lt;p&gt;***********************&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.infopathdev.com/blogs/hilary/archive/2012/06/25/qrules-submittosharepointlist-walkthrough-for-v4-2-adding-attachments.aspx"&gt;Working with Attachments&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.infopathdev.com/blogs/hilary/archive/2012/06/27/qrules-submittosharepointlist-walkthrough-for-v4-2-working-with-existing-data-amp-submitting-a-single-mapping.aspx"&gt;Submitting a Single Mapping / Updating Existing Data&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.infopathdev.com/blogs/hilary/archive/2012/07/05/qrules-refreshsharepointlistitems-walkthrough-for-v4-2.aspx"&gt;RefreshSharePointListItems&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=79076" width="1" height="1"&gt;</description><category domain="http://www.infopathdev.com/blogs/hilary/archive/tags/qRules/default.aspx">qRules</category><category domain="http://www.infopathdev.com/blogs/hilary/archive/tags/SubmitToSharePointList/default.aspx">SubmitToSharePointList</category></item><item><title>qRules SubmitToSharePointList Command - General Mapping Overview</title><link>http://www.infopathdev.com/blogs/hilary/archive/2012/05/30/qrules-submittosharepointlist-command-general-overview.aspx</link><pubDate>Wed, 30 May 2012 21:20:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:79073</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Before I go into too much depth on using the SubmitToSharePointList command in qRules 4.2, I thought it might be helpful to provide a brief overview on how the command works.&lt;/p&gt;
&lt;p&gt;At it&amp;#39;s most basic, the command requires:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;A&amp;nbsp;submit data connection to the SharePoint Lists web service&amp;#39;s UpdateListItems method&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;A mapping file indicating the connection between the InfoPath form and the SharePoint list&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;A data connection to the mapping file&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;The mapping file is used by the command code to discern the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;The URL for the SharePoint server for the list the data should submit to&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;The GUID of the SharePoint list to submit the data to&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;The form field to list column connection for the data&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Here&amp;#39;s what the mapping XML looks like for a 4.2 mapping - marked up to help you understand the data:&lt;br /&gt;&lt;img style="WIDTH:1072px;HEIGHT:677px;" src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/mapping1.png" width="1072" height="677" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;In the screenshot below, I&amp;#39;ve expanded the &amp;quot;Products&amp;quot; mapping so you can see how the mapping changes when we are mapping repeating data:&lt;br /&gt;&lt;img style="WIDTH:1027px;HEIGHT:517px;" src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/mapping2.png" width="1027" height="517" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;So - if there is an XPath in the RepeatingGroup node, all the other FormField values need to be relative to that XPath. That is - starting at the my:Product node (using the example above), how do we get to the my:Name field inside the group? Starting at the my:Product node, how do we get to the my:ShpId located here: my:myFields/my:Category/my:ShpId? &lt;/p&gt;
&lt;p&gt;And you thought this was going to be boring!&lt;/p&gt;
&lt;p&gt;Next up - a tutorial on actually using the 4.2 version of the SubmitToSharePointList command.&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=79073" width="1" height="1"&gt;</description><category domain="http://www.infopathdev.com/blogs/hilary/archive/tags/qRules/default.aspx">qRules</category><category domain="http://www.infopathdev.com/blogs/hilary/archive/tags/SubmitToSharePointList/default.aspx">SubmitToSharePointList</category></item><item><title>qRules SubmitToSharePointList Command - Changes for v4.2</title><link>http://www.infopathdev.com/blogs/hilary/archive/2012/05/30/qrules-submittosharepointlist-command-changes-for-v4-2.aspx</link><pubDate>Wed, 30 May 2012 21:00:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:79070</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;The last time I blogged at any length about SubmitToSharePointList was when we originally released the command. With the upcoming qRules 4.2 release, this command is undergoing a pretty major overhaul, and I think some update posts are in order.&lt;/p&gt;
&lt;p&gt;To start with, however, I want to assure you that we have worked very hard to make sure the command remains backward compatible. So, if you have a form that uses SubmitToSharePointList, and it works just the way you want it to – you can re-inject your form with qRules 4.2, and command will keep working. No changes needed on your part.&lt;/p&gt;
&lt;p&gt;I intend to post a series of walk-throughs for the command, but to begin with, I’d like to simply talk about what is changing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Mapping Tool&lt;/strong&gt;&lt;br /&gt;This form has been revamped to allow you to create multiple mappings for a single template within the form. This means that if your form template is meant to map to multiple lists, you can create a single mapping file.&lt;/p&gt;
&lt;p&gt;There are some caveats here – currently, you’ll need to map your form to the lists in the order you wish to submit them – while we have plans to simplify this even further, they are not in place for the 4.2 release. So, if you have, for example, a parent-child relationship in your form between a customer and the contacts for the customer, you’d want to map the parent first, then the child. qRules will submit (and refresh, if you use the RefreshSharePointListItems command) the mapping in order (unless you specify which mapping you wish to submit / refresh, more on that further down in the post).&lt;/p&gt;
&lt;p&gt;In the mapping tool, you can indicate which field you would like to store the SharePoint list item id in – this replaces the /id parameter. You do not have to specify an id field, of course – there are use cases where you wish to only submit items from your form to the list, but not leave the form connected to the list item. If you have a field that contains attachments you wish to include with your list items, you can also specify those.&lt;br /&gt;&lt;img style="WIDTH:624px;HEIGHT:88px;" src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit1.png" width="624" height="88" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Id and attachment fields are not mapped to columns – if you select one of those options, you’ll instead see some help text on how those fields are used:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit2.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;This form still functions in a stand-alone mode as well – including with multiple mappings. So, if you have a big bunch of XML you’d like to get submitted to your lists, you can use the form on its own. As a stand-alone form, however, the fields indicated as the id fields do not get updated, nor are attachments added to your list items.&lt;/p&gt;
&lt;p&gt;We’ve also added an “Import Existing qRules Mapping” button – you can import any qRules mapping file with this functionality – whether 4.2 or earlier.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Submit Connection&lt;br /&gt;&lt;/strong&gt;As in previous versions of the command, you&amp;#39;ll need to create a submit data connection in your form to the UpdateListItems method of the SharePoint Lists web service. That web&amp;nbsp;service URL&amp;nbsp;looks like this:&lt;br /&gt;&lt;a href="http://myserver/_vti_bin/lists.asmx"&gt;http://myserver/_vti_bin/lists.asmx&lt;/a&gt;&lt;br /&gt;With &amp;quot;myserver&amp;quot;&amp;nbsp;replaced with your actual SharePoint&amp;nbsp;server URL.&lt;/p&gt;
&lt;p&gt;When you create the data connection,&amp;nbsp;with qRules 4.2 you&amp;nbsp;no longer have to select any values for the parameters - InfoPath will fuss, but you can safely ignore it:&lt;strong&gt;&amp;nbsp;&lt;br /&gt;&lt;img style="WIDTH:813px;HEIGHT:134px;" src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit5.png" width="813" height="134" alt="" /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Click &amp;quot;Yes&amp;quot; to the warning and finish creating the connection - qRules will set the input parameters for you when you execute the command.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Command Parameters&lt;br /&gt;&lt;/strong&gt;If you’ve used earlier versions of this command, the syntax will be familiar:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;SubmitToSharePointList /submit={name of your submit connection} /mapping={name of your mapping connection} /id={XPath to your id field – relative for repeating}&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The /id parameter is optional.&lt;/p&gt;
&lt;p&gt;With the new mapping file format, you can indicate the field for your id from within the mapping – that’s because if you are mapping to multiple lists, the /id parameter would be insufficient. That is – if you had mapped to a Customers list and an Orders list in a single mapping file, and included an /id parameter – which SharePoint list would be populating that id? The Customers list? The Orders list? &lt;/p&gt;
&lt;p&gt;By indicating the correct field for the SharePoint list item id from the mapping, the mapping file contains all the information qRules needs to populate your id field.&lt;/p&gt;
&lt;p&gt;Since you can now have a single data connection to a single mapping file no matter how many SharePoint lists you will be submitting data to, the command no longer requires the /mapping parameter - if you name your mapping data connection &lt;strong&gt;&lt;em&gt;mapping&lt;/em&gt;&lt;/strong&gt;. If you name it &lt;strong&gt;&lt;em&gt;mySuperFancyMappingDataConnection&lt;/em&gt;&lt;/strong&gt;, you&amp;#39;ll still need the /mapping parameter to indicate the correct data connection for the mapping file.&lt;/p&gt;
&lt;p&gt;So, your command could be as simple as:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;SubmitToSharePointList /submit={name of your submit connection}&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Just one parameter, but with the ability to submit to multiple lists, and to populate your form with the new list item ids.&lt;/p&gt;
&lt;p&gt;If you also want to submit attachments, you’ll need to create a data connection to the AddAttachments method of the Lists web service and include the /dsname parameter. You can indicate the fields with the attachments in the mapping tool.&lt;/p&gt;
&lt;p&gt;Each individual list mapping will have a name – it defaults to the name of your list:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit3.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;If you wish to submit to just a single list, even though your mapping file has multiple list mappings, you can include the name in the command:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;SubmitToSharePointList /submit={name of your submit connection} /mappingName={name of your list mapping – in my screenshot above, it would be Customers}&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;If you were for some reason to map the same form to the same list twice – perhaps you had two different groups that needed to submit to the same list – the form will display the mapping name for the second instance of the list so you can adjust the name to something unique:&lt;br /&gt;&lt;img src="http://www.infopathdev.com/blogs/hilary/4.2SubmitToShPList/ShPSubmit4.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;*************&lt;/p&gt;
&lt;p&gt;So, that’s the basics – the mapping tool now allows multiple list mappings for a single template. You can indicate the old /id parameter in the mapping as well as the /xpath for attachments. The command itself can be greatly simplified, especially if you name your mapping data connection &lt;strong&gt;&lt;em&gt;mapping&lt;/em&gt;&lt;/strong&gt; and want to submit to all your lists at once. You can inject 4.1 forms with 4.2 – say you need to use some of the amazing new math, financial or string commands in 4.2 with a form that has been using the SubmitToSharePointList command – without any issues… the command is fully backward compatible. I should add - if you want to use separate mappings for each list, you certainly can still do that, with multiple mapping data connections in your form. But you can use just one submit connection for all of them - no more creating a submit connection for each list.&lt;/p&gt;
&lt;p&gt;In the next couple weeks as we finish testing and prepare to release qRules 4.2, I’ll get more blog entries up on using the updated mapping tool and command - when qRules 4.2 is ready, you&amp;#39;ll be ready too!&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=79070" width="1" height="1"&gt;</description><category domain="http://www.infopathdev.com/blogs/hilary/archive/tags/qRules/default.aspx">qRules</category><category domain="http://www.infopathdev.com/blogs/hilary/archive/tags/SubmitToSharePointList/default.aspx">SubmitToSharePointList</category></item><item><title>qRules: Use SubmitToSharePointList with a Calendar</title><link>http://www.infopathdev.com/blogs/hilary/archive/2012/05/24/qrules-use-submittosharepointlist-with-a-calendar.aspx</link><pubDate>Thu, 24 May 2012 18:50:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:78934</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;The qRules SubmitToSharePointList command is a great way to get information from your InfoPath form into a SharePoint List - however, there was recently a &lt;a href="http://www.infopathdev.com/forums/t/22593.aspx"&gt;thread&lt;/a&gt; in the forum where a qRules user was having problems submitting form data to a Calendar. The error was:&lt;br /&gt;&amp;quot;Errors occurred submitting to list: Invalid date/time value. A date/time field contains invalid data. Please check the value and try again.&amp;quot;&lt;/p&gt;
&lt;p&gt;Turns out the date time for the Calendar list required a different format:&lt;br /&gt;yyyy-MM-ddTHH:mm:ssZ&lt;/p&gt;
&lt;p&gt;The qRules format data command can return a date with a custom format - so, if you need to submit to a calendar, you may want to leave regular date time controls on your form for your users to select with, but have another field that is mapped to your SharePoint list. Set that field to the result of the FormatDate command, so that your Start and End date have the correct format prior to submitting.&lt;br /&gt;&lt;/p&gt;&lt;img src="http://www.infopathdev.com/aggbug.aspx?PostID=78934" width="1" height="1"&gt;</description></item></channel></rss>