<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Jim Cantwell</title><link>https://www.infopathdev.com:443/blogs/jim/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Multiple Credential Prompts</title><link>https://www.infopathdev.com:443/blogs/jim/archive/2013/08/02/multiple-credential-prompts.aspx</link><pubDate>Sat, 03 Aug 2013 04:07:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:91916</guid><dc:creator>Jim Cantwell</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">https://www.infopathdev.com:443/blogs/jim/rsscomments.aspx?PostID=91916</wfw:commentRss><comments>https://www.infopathdev.com:443/blogs/jim/archive/2013/08/02/multiple-credential-prompts.aspx#comments</comments><description>&lt;p&gt;You may have come across SharePoint sites where you get repeated credential prompts.&amp;nbsp; Or, you get prompted multiple times setting up a data connection in your InfoPath form.&amp;nbsp; This issue cropped up with the introduction of Windows Vista and continues on with Windows 7 and most likely Windows 8.&amp;nbsp; The issue involves a fully qualified domain name (FQDN) being accessed with the WEBDAV protocol that SharePoint utilizes&amp;nbsp;with client access.&lt;/p&gt;&lt;p&gt;&lt;span class="userInput"&gt;While the KB article indicates a hotfix is available, the fix has integrated into Windows 7 service packs for quite some time.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="userInput"&gt;The fix is to setup a registry key AuthForwardServerList with the list of&amp;nbsp;FQDN sites that need to be treated as Local Intranet.&amp;nbsp; This allows your credentials to be pass through the communication layers&amp;nbsp;and to the server you are authenticating against.&lt;/span&gt;&lt;span class="userInput"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="userInput"&gt;For complete details on the procedure, see &lt;/span&gt;&lt;span class="userInput"&gt;&lt;a title="KB 943280" href="http://support.microsoft.com/kb/943280" target="_blank"&gt;KB 943280&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=91916" width="1" height="1"&gt;</description></item><item><title>Prevent the Open/Save dialog prompt when opening DBXL document from SharePoint 2010 site</title><link>https://www.infopathdev.com:443/blogs/jim/archive/2012/01/04/prevent-the-open-save-dialog-prompt-when-opening-dbxl-document-from-sharepoint-2010-site.aspx</link><pubDate>Wed, 04 Jan 2012 19:09:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73477</guid><dc:creator>Jim Cantwell</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">https://www.infopathdev.com:443/blogs/jim/rsscomments.aspx?PostID=73477</wfw:commentRss><comments>https://www.infopathdev.com:443/blogs/jim/archive/2012/01/04/prevent-the-open-save-dialog-prompt-when-opening-dbxl-document-from-sharepoint-2010-site.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-size:11pt;mso-fareast-theme-font:minor-fareast;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;If you have&amp;nbsp;added a dataview to list DBXL documents, you will&amp;nbsp;find that links will give you an open/save prompt.&amp;nbsp; This little code snippet will prevent the dialog on a SharePoint 2010 page (it may also work for SharePoint 2007, but I haven&amp;#39;t tried it).&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:11pt;mso-fareast-theme-font:minor-fareast;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;span style="font-size:11pt;mso-fareast-theme-font:minor-fareast;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;onclick=&amp;quot;var b = StsOpenEnsureEx2(&amp;#39;SharePoint.OpenXMLDocuments&amp;#39;);
b.EditDocument2(window, &amp;#39;{@Link}&amp;#39;, &amp;#39;InfoPath.Document&amp;#39;); return false;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:11pt;mso-fareast-theme-font:minor-fareast;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;span style="font-size:11pt;mso-fareast-theme-font:minor-fareast;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;p&gt;&lt;span style="font-size:11pt;mso-fareast-theme-font:minor-fareast;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;Also, check out Jo-Anne&amp;#39;s blog on using a shared javascript&amp;nbsp;file to do the same that will work for SharePoint 2007:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:11pt;mso-fareast-theme-font:minor-fareast;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;/span&gt;&lt;span style="font-size:11pt;mso-fareast-theme-font:minor-fareast;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;a href="http://www.infopathdev.com/blogs/jo-anne_alfafara/archive/2010/10/15/best-way-to-launch-forms-from-sharepoint.aspx"&gt;&lt;font color="#0000ff"&gt;http://www.infopathdev.com/blogs/jo-anne_alfafara/archive/2010/10/15/best-way-to-launch-forms-from-sharepoint.aspx&lt;/font&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:11pt;mso-fareast-theme-font:minor-fareast;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=73477" width="1" height="1"&gt;</description><category domain="https://www.infopathdev.com:443/blogs/jim/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="https://www.infopathdev.com:443/blogs/jim/archive/tags/dbxl/default.aspx">dbxl</category><category domain="https://www.infopathdev.com:443/blogs/jim/archive/tags/dataview/default.aspx">dataview</category></item><item><title>Configuring an Intranet/Extranet DBXL site for IPFS use</title><link>https://www.infopathdev.com:443/blogs/jim/archive/2011/05/26/configuring-an-intranet-extranet-dbxl-site-for-ipfs-use.aspx</link><pubDate>Thu, 26 May 2011 15:02:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:66831</guid><dc:creator>Jim Cantwell</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">https://www.infopathdev.com:443/blogs/jim/rsscomments.aspx?PostID=66831</wfw:commentRss><comments>https://www.infopathdev.com:443/blogs/jim/archive/2011/05/26/configuring-an-intranet-extranet-dbxl-site-for-ipfs-use.aspx#comments</comments><description>&lt;p&gt;You may have an internal SharePoint site which is extended to an Extranet or Internet zone.&amp;nbsp; A simple InfoPath browser form will work fine in both zones without modification.&amp;nbsp; But when you add data connections to connect to an external&amp;nbsp;web service, such as DBXL, it can become problematic.&amp;nbsp; When using Alternate Access Mappings (AAM), SharePoint will redirect calls to any referenced internal url to the url of the site the user accesses the form.&amp;nbsp; Say you have an&amp;nbsp;internal site &lt;a href="http://sharepoint"&gt;http://sharepoint&lt;/a&gt;, and is extended to the extranet zone as &lt;a href="http://portal.domain.com"&gt;http://portal.domain.com&lt;/a&gt;.&amp;nbsp; If your form&amp;nbsp;has a data connection to &lt;a href="http://sharepoint/QdabraWebService/DbxlDocumentService.asmx"&gt;http://sharepoint/QdabraWebService/DbxlDocumentService.asmx&lt;/a&gt; ,it will be redirected to &lt;a href="http://portal.domain.com/QdabraWebService/DbxlDocumentService.asmx"&gt;http://portal.domain.com/QdabraWebService/DbxlDocumentService.asmx&lt;/a&gt;&amp;nbsp;when opening the form from &lt;a href="http://portal.domain.com"&gt;http://portal.domain.com&lt;/a&gt;.&amp;nbsp; &lt;/p&gt;&lt;p&gt;When DBXL is installed, it is installed under the SharePoint site selected during installation.&amp;nbsp; In this scenario, it resides on &lt;a href="http://sharepoint"&gt;http://sharepoint&lt;/a&gt;.&amp;nbsp; So when the form attempts to access it through &lt;a href="http://portal.domain.com"&gt;http://portal.domain.com&lt;/a&gt;, it cannot be found.&amp;nbsp; To remedy this situation, and allow the browser form to submit without special casing the extranet scenario, you can create a QdabraWebService virtual directory under the extranet site which maps to the physical disk location of the QdabraWebService on the internal site.&lt;/p&gt;&lt;p&gt;Creating the virtual directory will vary&amp;nbsp;slightly between IIS6 and IIS7.&amp;nbsp; &lt;/p&gt;&lt;p&gt;In IIS7:&lt;/p&gt;&lt;p&gt;1) Open IIS Manager&lt;/p&gt;&lt;p&gt;2) Right-click the extranet site, select &amp;quot;Add Virtual Directory&amp;quot;&lt;/p&gt;&lt;p&gt;3) Provide the Alias &amp;quot;QdabraWebService&amp;quot; and physical path of the QdabraWebService under the&amp;nbsp;internal site&amp;nbsp;(e.g. C:\inetpub\wwwroot\wss\VirtualDirectories\80\QdabraWebService)&lt;/p&gt;&lt;p&gt;4) Right-click the newly added QdabraWebService directory under the extranet site and select &amp;quot;Convert to Application&amp;quot;&lt;/p&gt;&lt;p&gt;5) The DBXL webservice APIs are now available on the extranet site and an IPFS form using DBXL services should now function.&lt;/p&gt;&lt;p&gt;In II6:&lt;/p&gt;&lt;p&gt;1) Open IIS Manager&lt;/p&gt;&lt;p&gt;2) Right-click the extranet site and select &amp;quot;New&amp;quot;, &amp;quot;Virtual Directory&amp;quot;&lt;/p&gt;&lt;p&gt;3) Provide the Alias &amp;quot;QdabraWebService&amp;quot; and physical path of the QdabraWebService under the internal site (e.g. C:\inetpub\wwwroot\wss\VirtualDirectories\80\QdabraWebService) and configure for &amp;quot;Read&amp;quot; and &amp;quot;Run Scripts&amp;quot; in the permissions dialog.&lt;/p&gt;&lt;p&gt;4) The DBXL webservice APIs are now available on the extranet site and an IPFS form using DBXL services should now function.&lt;/p&gt;&lt;p&gt;The document and template urls will not function on the extranet site.&amp;nbsp; Accessing &lt;a href="http://portal.domain.com/QdabraWebService/Forms/MyForm/template.xsn"&gt;http://portal.domain.com/QdabraWebService/Forms/MyForm/template.xsn&lt;/a&gt; will result in an HTTP 404 Not Found.&amp;nbsp;&amp;nbsp;&amp;nbsp; These access methods can be enabled by additional configuration of the virtual directory, but is not recommended.&amp;nbsp; IPFS forms should be opened from the SharePoint site to function properly in both intranet and extranet scenarios.&lt;/p&gt;&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=66831" width="1" height="1"&gt;</description></item><item><title>Integrating Qdabra DBXL with Nintex Workflow</title><link>https://www.infopathdev.com:443/blogs/jim/archive/2011/03/04/integrating-qdabra-dbxl-with-nintex-workflow.aspx</link><pubDate>Fri, 04 Mar 2011 18:59:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:64836</guid><dc:creator>Jim Cantwell</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">https://www.infopathdev.com:443/blogs/jim/rsscomments.aspx?PostID=64836</wfw:commentRss><comments>https://www.infopathdev.com:443/blogs/jim/archive/2011/03/04/integrating-qdabra-dbxl-with-nintex-workflow.aspx#comments</comments><description>&lt;p&gt;This document covers how to integrate the DBXL web service with Nintex Workflow 2010.&amp;nbsp; The scenario goes through saving an InfoPath form to a SharePoint library and then running a Nintex Workflow on the form, which submits the form to DBXL for shredding and further processing.&lt;/p&gt;&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=64836" width="1" height="1"&gt;</description><enclosure url="https://www.infopathdev.com:443/blogs/jim/attachment/64836.ashx" length="1033610" type="application/pdf" /></item><item><title>Best Practice for Database Redundancy with DBXL</title><link>https://www.infopathdev.com:443/blogs/jim/archive/2009/05/18/best-practice-for-database-redundancy-with-dbxl.aspx</link><pubDate>Mon, 18 May 2009 15:02:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:41839</guid><dc:creator>ErnestoM</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">https://www.infopathdev.com:443/blogs/jim/rsscomments.aspx?PostID=41839</wfw:commentRss><comments>https://www.infopathdev.com:443/blogs/jim/archive/2009/05/18/best-practice-for-database-redundancy-with-dbxl.aspx#comments</comments><description>&lt;p&gt;Large enterprises generally have redundancy mechanisms in place for critical SQL databases and are managed by an IT staff.&amp;nbsp; For those without the large IT staff to manage your systems, you may still need something more than nightly backups.&amp;nbsp; For high-availability without high cost,&amp;nbsp; SQL Server 2005 Standard and Enterprise Edition introduced database mirroring support.&amp;nbsp; Using a passive SQL Server to mirror the DBXL database, you can obtain high-availability without the need for an additional SQL Server license.&amp;nbsp; The SQL instance can be on an existing or new server (including VMs) with sufficient resources to host the database.&amp;nbsp;&amp;nbsp; Just remember when using VMs, that failovers should reside on different physical hosts.&amp;nbsp; For additional information, refer to SQL Server 2005 Books Online topic “&lt;a href="http://msdn.microsoft.com/en-us/library/ms189852%28SQL.90%29.aspx" target="_blank"&gt;Overview of Database Mirroring&lt;/a&gt;”.&lt;/p&gt;&lt;p&gt;SQL Server 2005 Workgroup does not support database mirroring but does support transaction log shipping, which is similar to asynchronous database mirroring.&amp;nbsp; For additional information, refer to SQL Server 2005 Books Online topic “&lt;a href="http://msdn.microsoft.com/en-us/library/ms187103%28SQL.90%29.aspx"&gt;Understanding Log Shipping&lt;/a&gt;”.&lt;/p&gt;&lt;p&gt;Additional licensing information can be obtained &lt;a href="http://www.microsoft.com/sqlserver/2005/en/us/Special-Considerations.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Note: Qdabra DBXL has not been tested with automatic failover and may require manual failover configuration.&lt;br /&gt;&lt;/p&gt;&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=41839" width="1" height="1"&gt;</description><category domain="https://www.infopathdev.com:443/blogs/jim/archive/tags/sql/default.aspx">sql</category><category domain="https://www.infopathdev.com:443/blogs/jim/archive/tags/dbxl/default.aspx">dbxl</category></item><item><title>Pass Parameters to InfoPath</title><link>https://www.infopathdev.com:443/blogs/jim/archive/2005/09/14/Pass-Parameters-to-InfoPath.aspx</link><pubDate>Wed, 14 Sep 2005 19:08:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:296</guid><dc:creator>Jim Cantwell</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">https://www.infopathdev.com:443/blogs/jim/rsscomments.aspx?PostID=296</wfw:commentRss><comments>https://www.infopathdev.com:443/blogs/jim/archive/2005/09/14/Pass-Parameters-to-InfoPath.aspx#comments</comments><description>&lt;p&gt;There is sometimes the need to pass arguments to InfoPath when opening a form.&amp;nbsp;You either want to switch to a specific view, or maybe want to turn on a diagnostic feature in your code. By leveraging the merge functionality of InfoPath, you can pass simple arguments or a complex set of data to your form.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Define A Parameters Schema&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;You will need to define a schema for your parameters. The example uses a simple repeating &lt;font face="Courier New"&gt;Param&lt;/font&gt; element containing name/value pairs like this:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;table style="table-layout:fixed;width:100%;border-collapse:collapse;word-wrap:break-word;border:medium none;"&gt;&lt;tr&gt;&lt;td style="background-color:#e6e6e6;border:#e6e6e6 6pt solid;"&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;lt;Params&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Param name=&amp;quot;&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;/Params&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Enable Merge Functionality&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;The next step is to enable the necessary merge functionality for your form. This is accomplished by editing the manifest.xsf as follows:&lt;/p&gt;&lt;p&gt;&lt;table style="table-layout:fixed;width:100%;border-collapse:collapse;word-wrap:break-word;border:medium none;"&gt;&lt;tr&gt;&lt;td style="background-color:#e6e6e6;border:#e6e6e6 6pt solid;"&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;lt;xsf:importParameters &lt;font color="#ff0000"&gt;&lt;strong&gt;enabled=&amp;quot;yes&amp;quot; useScriptHandler=&amp;quot;yes&amp;quot;&lt;/strong&gt;&lt;/font&gt;&amp;gt;&amp;lt;/xsf:importParameters&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;The &lt;font face="Courier New"&gt;enabled&lt;/font&gt; and &lt;font face="Courier New"&gt;useScriptHandler&lt;/font&gt; attributes of the &lt;font face="Courier New"&gt;importParameters&lt;/font&gt; element should be set to &lt;strong&gt;yes&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Add OnMergeRequest/OnAfterImport Code&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;The &lt;em&gt;OnMergeRequest&lt;/em&gt; event is fired whenever a merge request is executed and merging is enabled in your form. If your form supports merges other than for parameter passing, this code will need modification to support that. This example expects a specific schema, and will just silently ignore any merge requests that do not use the expected schema. It is recommended to perform most work in &lt;em&gt;OnAfterImport&lt;/em&gt;, as things like switching views cannot be done in the &lt;em&gt;OnMergeRequest&lt;/em&gt; event.&lt;/p&gt;&lt;p&gt;&lt;table style="table-layout:fixed;width:100%;border-collapse:collapse;word-wrap:break-word;border:medium none;"&gt;&lt;tr&gt;&lt;td style="background-color:#e6e6e6;border:#e6e6e6 6pt solid;"&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;var g_fArgumentsPassed = false;&lt;br /&gt;var g_argsDOM = null;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;function XDocument::OnMergeRequest(eventObj)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var dom = eventObj.DOM;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Add your validation here that the DOM passed is the &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // schema expected, and only set eventObj.ReturnStatus to true&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // if a valid schema.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (dom.selectNodes(&amp;quot;/Params/Param&amp;quot;).nextNode())&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; g_fArgumentsPassed = true;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; g_argsDOM = dom;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // We silently ignore any bad requests by always setting the ReturnStatus to true&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; eventObj.ReturnStatus = true;&lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;function XDocument::OnAfterImport(eventObj)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (g_fArgumentsPassed)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var nodes;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var node;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var paramName, paramValue;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nodes = g_argsDOM.selectNodes(&amp;quot;/Params/Param&amp;quot;);&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (node = nodes.nextNode())&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; paramName = node.selectSingleNode(&amp;quot;@name&amp;quot;).text;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; paramValue = node.selectSingleNode(&amp;quot;@value&amp;quot;).text;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (paramName == &amp;quot;Cancel&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Switch to cancellation view&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XDocument.View.SwitchView(&amp;quot;Cancel Order&amp;quot;);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (paramName == &amp;quot;view&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Switch to requested view&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XDocument.View.SwitchView(paramValue);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Clear flag, as this could be called again if another merge is performed&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; g_fArgumentsPassed = false;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;strong&gt;Test Your OnMergeRequest/OnAfterImport Code&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;The simplest way to test your code is to use File | Merge Forms menu command.&amp;nbsp;This menu option will be enabled after modifying your form&amp;#39;s manifest.xsf as done above. If you are using the example parameter schema, create an&amp;nbsp;XML file containing the content below, and select the file in the dialog presented when you use the Merge Forms command.&lt;/p&gt;&lt;p&gt;&lt;table style="table-layout:fixed;width:100%;border-collapse:collapse;word-wrap:break-word;border:medium none;"&gt;&lt;tr&gt;&lt;td style="background-color:#e6e6e6;border:#e6e6e6 6pt solid;"&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; ?&amp;gt;&lt;br /&gt;&amp;lt;Params&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Param name=&amp;quot;Cancel&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;/Params&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Opening a Document and Passing Parameters From a Web Page&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Installed with Microsoft Office is the &amp;quot;SharePoint.OpenXMLDocuments&amp;quot; object. The &lt;em&gt;MergeDocuments2&lt;/em&gt; method can be used to open a document or template and pass the URLs as merge files, which in this case will be a parameters file.&lt;/p&gt;&lt;p&gt;This script below works in conjunction with a merge view of a SharePoint form library. When a single merge checkbox is selected, it will open the document using &lt;em&gt;MergeDocuments2&lt;/em&gt;. A&amp;nbsp;URL to the CancelParams.xml file containing the arguments to be passed as an argument to &lt;em&gt;MergeDocuments2&lt;/em&gt;. &lt;/p&gt;&lt;p&gt;&lt;table style="table-layout:fixed;width:100%;border-collapse:collapse;word-wrap:break-word;border:medium none;"&gt;&lt;tr&gt;&lt;td style="background-color:#e6e6e6;border:#e6e6e6 6pt solid;"&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;lt;script&amp;gt;&lt;br /&gt;function CancelOrder()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var cItemsChecked = 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var selectedOrder;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var chkCombineCollection = document.all.chkCombine;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (i=0; i&amp;lt;chkCombineCollection.length; i++)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (chkCombineCollection[i].checked)&lt;br /&gt;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; selectedOrder = chkCombineCollection[i];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cItemsChecked++;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Single item selected will not be a collection and can be determined when &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // the checked property is true&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (cItemsChecked == 0 &amp;amp;&amp;amp; document.all.chkCombine.checked)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; selectedOrder = document.all.chkCombine;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cItemsChecked = 1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (cItemsChecked != 1)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(&amp;quot;Please select exactly one order to cancel.&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlDocObject = new ActiveXObject(&amp;quot;SharePoint.OpenXMLDocuments&amp;quot;);&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (xmlDocObject)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var strTempLoc = &amp;quot;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;http://servername/Order&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt; Form/Forms/template.xsn&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var strSaveLoc = &amp;quot;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;http://servername/Order&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt; Form&amp;quot;;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // This is the document collection which the MergeDocuments2 call takes&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // In this case, we are only passing one file containing the arguments&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var docCol = Array( {checked:true, HREF:&amp;quot;&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;http://servername/Parameters/CancelOrder.xml&lt;/font&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;quot;} );&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Declare an iterator function for the collection of documents.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function item(index)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return docCol[index];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // wrap the collection and the interator into an object suitable&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // for MergeDocuments2 call.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var docWrap = {length:docCol.length, item:item};&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // If opening a new file, pass the url to the template instead of the document url&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlDocObject.MergeDocuments2(window, selectedOrder.HREF, docWrap, strSaveLoc);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Pass Parameters to InfoPath From the Command Line&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;To pass parameters to InfoPath from the command line, you use the optional &lt;em&gt;/aggregate&lt;/em&gt; switch. You may pass in multiple forms to the template, separating them with the pipe character: &amp;quot;|&amp;quot;. You may use optional quotes around the entire list of forms, but not around each individual form.&lt;/p&gt;&lt;p&gt;An example command line would look like the following:&lt;/p&gt;&lt;p&gt;&lt;table style="table-layout:fixed;width:100%;border-collapse:collapse;word-wrap:break-word;border:medium none;"&gt;&lt;tr&gt;&lt;td style="background-color:#e6e6e6;border:#e6e6e6 6pt solid;"&gt;&lt;p&gt;&lt;font color="#333399" face="Courier New" style="font-size:10pt;"&gt;InfoPath.exe /aggregate &amp;quot;ParamFile1.xml|ParamFile2.xml|ParamFile3.xml&amp;quot; MyFormTemplate.xsn&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=296" width="1" height="1"&gt;</description><category domain="https://www.infopathdev.com:443/blogs/jim/archive/tags/OnAfterImport/default.aspx">OnAfterImport</category><category domain="https://www.infopathdev.com:443/blogs/jim/archive/tags/importParameters/default.aspx">importParameters</category><category domain="https://www.infopathdev.com:443/blogs/jim/archive/tags/Arguments/default.aspx">Arguments</category><category domain="https://www.infopathdev.com:443/blogs/jim/archive/tags/MergeDocuments2/default.aspx">MergeDocuments2</category><category domain="https://www.infopathdev.com:443/blogs/jim/archive/tags/Parameters/default.aspx">Parameters</category><category domain="https://www.infopathdev.com:443/blogs/jim/archive/tags/JScript/default.aspx">JScript</category><category domain="https://www.infopathdev.com:443/blogs/jim/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="https://www.infopathdev.com:443/blogs/jim/archive/tags/Code/default.aspx">Code</category><category domain="https://www.infopathdev.com:443/blogs/jim/archive/tags/OnMergeRequest/default.aspx">OnMergeRequest</category><category domain="https://www.infopathdev.com:443/blogs/jim/archive/tags/Schema/default.aspx">Schema</category></item></channel></rss>