<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.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>Philo's WebLog : InfoPath</title><link>http://blogs.msdn.com/philoj/archive/tags/InfoPath/default.aspx</link><description>Tags: InfoPath</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>InfoPath &amp; SharePoint screencast demo</title><link>http://blogs.msdn.com/philoj/archive/2007/09/28/infopath-sharepoint.aspx</link><pubDate>Fri, 28 Sep 2007 08:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5179743</guid><dc:creator>philoj</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/philoj/comments/5179743.aspx</comments><wfw:commentRss>http://blogs.msdn.com/philoj/commentrss.aspx?PostID=5179743</wfw:commentRss><description>&lt;P&gt;As&amp;nbsp; follow-up to the "hook InfoPath to a database" demo, here I'm taking a step back to a simpler form - building an InfoPath form to be used on its own in conjunction with SharePoint. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;A href="http://channel9.msdn.com/ShowPost.aspx?PostID=344635"&gt;http://channel9.msdn.com/ShowPost.aspx?PostID=344635&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;In the next few videos I'm going to cover:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;InfoPath, xml schemas, and xml&lt;/LI&gt;
&lt;LI&gt;An advanced InfoPath form connected to a database&lt;/LI&gt;
&lt;LI&gt;Connecting an InfoPath form to a .Net web service&lt;/LI&gt;
&lt;LI&gt;Connecting an InfoPath form to a SQL Server web service&lt;/LI&gt;
&lt;LI&gt;eForms &amp;amp; workflow in SharePoint&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;(Just a reminder - this and other fun InfoPath 2007 stuff all covered in &lt;A class="" href="http://www.amazon.com/gp/product/1590597303?ie=UTF8&amp;amp;tag=philosvbaccesspr&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1590597303" target=_blank mce_href="http://www.amazon.com/gp/product/1590597303?ie=UTF8&amp;amp;tag=philosvbaccesspr&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1590597303"&gt;my book&lt;/A&gt;...) &lt;/P&gt;
&lt;P&gt;&amp;nbsp;I'll also be covering more business intelligence content (SQL Server Analysis Services, ProClarity, PerformancePoint - stay tuned!)&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5179743" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/philoj/archive/tags/Developer/default.aspx">Developer</category><category domain="http://blogs.msdn.com/philoj/archive/tags/InfoPath/default.aspx">InfoPath</category><category domain="http://blogs.msdn.com/philoj/archive/tags/Non-Tech/default.aspx">Non-Tech</category></item><item><title>Why InfoPath?</title><link>http://blogs.msdn.com/philoj/archive/2007/09/20/why-infopath.aspx</link><pubDate>Thu, 20 Sep 2007 18:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5014140</guid><dc:creator>philoj</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/philoj/comments/5014140.aspx</comments><wfw:commentRss>http://blogs.msdn.com/philoj/commentrss.aspx?PostID=5014140</wfw:commentRss><description>&lt;P&gt;Okay, I'm going to try a different approach on the "why do I care about InfoPath?" issue. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;I recorded a short screencast and posted it to Channel9: &lt;A href="http://channel9.msdn.com/ShowPost.aspx?PostID=343092"&gt;http://channel9.msdn.com/ShowPost.aspx?PostID=343092&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;In the screencast, I walk through setting up an InfoPath form to connect to a database, and show how the idea is to free up developers from having to write form after form after form... &lt;/P&gt;
&lt;P&gt;&amp;nbsp;I'd like feedback on if this approach helps, and if you'd like to see more screencasts. &lt;/P&gt;
&lt;P&gt;For those who are wondering, the last year has been a bit, um, "interesting." I transferred out of my Office Developer role and over to the BI group, was in the BI group when we acquired ProClarity, lived through PerformancePoint's growing pains, and just three months ago transferred again to the Lockheed Martin account team. So - bumpy roads all around. &lt;/P&gt;
&lt;P&gt;I'm going to broaden the focus of the blog here a bit (but Philo, how can it be any broader than "haven't posted anything"?) well... I'm going to start covering Business Intelligence as well, but keep a solution-oriented focus including SharePoint and InfoPath. &lt;/P&gt;
&lt;P&gt;We'll see how it goes. &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5014140" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/philoj/archive/tags/InfoPath/default.aspx">InfoPath</category></item><item><title>"InfoPath isn't part of Office"</title><link>http://blogs.msdn.com/philoj/archive/2007/02/26/infopath-isn-t-part-of-office.aspx</link><pubDate>Mon, 26 Feb 2007 16:04:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1763374</guid><dc:creator>philoj</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/philoj/comments/1763374.aspx</comments><wfw:commentRss>http://blogs.msdn.com/philoj/commentrss.aspx?PostID=1763374</wfw:commentRss><description>&lt;P&gt;Simon said:&lt;/P&gt;
&lt;P&gt;"Then you find out its not part of the office suite."&lt;/P&gt;
&lt;P&gt;To be fair, this is somewhat true. At best, it's confusing. &lt;/P&gt;
&lt;P&gt;With Office 2003, InfoPath wasn't part of the suite you could buy retail or on open license. However, if you bought Office Pro on an enterprise agreement, you did have rights to InfoPath for every desktop.&lt;/P&gt;
&lt;P&gt;Unfortunately, in the volume license media, there were two DVD's: one labeled "Office Professional" and another labeled "InfoPath." You had to understand the licensing to understand that you owned InfoPath. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is much better in Office 2007, where InfoPath is in Office Professional Plus, Enterprise, and Ultimate. &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1763374" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/philoj/archive/tags/InfoPath/default.aspx">InfoPath</category></item><item><title>Why hasn't anyone heard of InfoPath?</title><link>http://blogs.msdn.com/philoj/archive/2007/02/25/why-hasn-t-anyone-heard-of-infopath.aspx</link><pubDate>Mon, 26 Feb 2007 02:46:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1759554</guid><dc:creator>philoj</dc:creator><slash:comments>15</slash:comments><comments>http://blogs.msdn.com/philoj/comments/1759554.aspx</comments><wfw:commentRss>http://blogs.msdn.com/philoj/commentrss.aspx?PostID=1759554</wfw:commentRss><description>&lt;P&gt;I recently wrote a &lt;A class="" href="http://www.amazon.com/Pro-InfoPath-2007-Philo-Janus/dp/1590597303/" mce_href="http://www.amazon.com/Pro-InfoPath-2007-Philo-Janus/dp/1590597303/"&gt;book on InfoPath 2007&lt;/A&gt;. What I find most amazing about the book is that it's evangelizing InfoPath. I've shown a number of developers the book, and when they read the description, their reaction is "wow, InfoPath sounds cool - I should check it out."&lt;/P&gt;
&lt;P&gt;How is it possible that a member of MS Office that's four years old has almost no mindshare? &lt;/P&gt;
&lt;P&gt;I don't know the answer - I'd be interested to hear suggestions on how to get the word out to more users and developers. &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1759554" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/philoj/archive/tags/Book+Review/default.aspx">Book Review</category><category domain="http://blogs.msdn.com/philoj/archive/tags/InfoPath/default.aspx">InfoPath</category></item><item><title>Creating a web service for an InfoPath form in 25 easy steps</title><link>http://blogs.msdn.com/philoj/archive/2005/11/08/490200.aspx</link><pubDate>Tue, 08 Nov 2005 08:07:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:490200</guid><dc:creator>philoj</dc:creator><slash:comments>9</slash:comments><comments>http://blogs.msdn.com/philoj/comments/490200.aspx</comments><wfw:commentRss>http://blogs.msdn.com/philoj/commentrss.aspx?PostID=490200</wfw:commentRss><description>&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;It took me a while to figure out how to do the InfoPath/webservice thing starting with an InfoPath form. Maybe this is blindingly obvious to everyone but me, but here it is anyway:&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;1) Create an InfoPath form from a new, blank form:&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;IMG src="http://storage.msn.com/x1pk64-9H0OKxRXxIzLauh3BGXyiQen_LTtO92JU8TJ3W2XeOtjy4zJzEYeFZeYPuzzJSys2sAQFFboNcgk66D3Tu0DajB9hpPHNGhdpRVPrfc7cFz63soTQVhu_ycxO07FENl6a4RX6oo5f02LAVgc1A"&gt;&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;2) Lay out your form, using sections, grouping, and naming controls as appropriate:&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;IMG src="http://storage.msn.com/x1pk64-9H0OKxRXxIzLauh3BGXyiQen_LTtO92JU8TJ3W09uaPk7TcK-tIVkO93kotsbhMhkQfBSUp6dc0Yec2pFne2geLfuQXoK5ZfmAR_PufkGjtcSEu1Aj9BxobOD54LuiA0C9Nrc-8T6WH4RxKWyw"&gt; &lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;3) Extract the form files (File | Extract Form Files) to a location you can find later.&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;4) Open Visual Studio .Net (I'm using 2003 in this example; this will work with 2005 as well. Remember - we're only building the web service in VS.Net; not InfoPath code)&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;5) Create a new ASP.Net web service project.&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;6) Switch to the code view of Service1.asmx and note the namespace. (Rename Service1 or add a new Web Service if you choose to)&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;7) Open the Visual Studio command prompt:&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Start | All Programs | Microsoft Visual Studio .Net 2003 | Visual Studio .Net Tools | Visual Studio .Net 2003 Command Prompt&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;8) You'll have to either close InfoPath or copy the myschema.xsd to another location (the file will be locked by InfoPath in design mode)&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;9) Go to the location you specified in step 8. Run xsd against the myschema.xsd in that directory; specify the namespace to the namespace from step 6:&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;xsd.exe myschema.xsd /classes /l:cs /n:InfoPathFormService&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;10) You'll now have a myschema.cs file. Add that to the web service project (right-click on the project, Add -&amp;gt; Existing item)&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;11) Define a new webservice method:&lt;/DIV&gt;
&lt;DIV style="PADDING-LEFT: 50px"&gt;&lt;STRONG&gt;[WebMethod]&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV style="PADDING-LEFT: 50px"&gt;&lt;STRONG&gt;&lt;FONT color=#0000ff&gt;public&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;void SubmitForm(myFields newForm)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV style="PADDING-LEFT: 50px"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;12) myFields is the root of the object model for your form:&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;IMG src="http://storage.msn.com/x1pk64-9H0OKxRXxIzLauh3BGXyiQen_LTtO92JU8TJ3W3y0RPrKMlgKbvJ2Z_y17vHctt6s4nurlVqEQfjYyeEf4i5U7TGLTsKWwbJovqdtHeabWKnhWJ18y1nNAv9cgbNmpZpAWdb57fb5BhyC_M3Kg"&gt; &lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;13) Put any logic in the WebMethod you need to parse the values out of the form, perform business logic, update databases, etc. &lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;14) Finally, let's hook the InfoPath form to the submit webservice. Publish the web service to a web server:&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;IMG src="http://storage.msn.com/x1pk64-9H0OKxRXxIzLauh3BGXyiQen_LTtO92JU8TJ3W0TjLcD-m69V4FB7Oh0DQI-0_hOd48QijztuX3mwDGJ22UITkgUlRk0g-FuJsn_-vUSKc9HszSxT0cxH4SMwo7T_Vgp_L58h0qsLWQcnowiJA"&gt;&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;15) Copy the URL of the web service. &lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;16) In the design mode of our InfoPath form, open Tools | Submitting forms:&lt;/DIV&gt;
&lt;DIV&gt;&lt;IMG src="http://storage.msn.com/x1pk64-9H0OKxRXxIzLauh3BGXyiQen_LTtO92JU8TJ3W0goOsl78IUZ9DPTMUVpP5cwlXqahkMi67fJpNEXehwUMUUQwxdcUUM2WdyBqqRZWIoNEz87Ldh8ZiZCeNCLGml4jeA8gQ68mRnsgMTs4H1vQ"&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;17) Enable submit commands and buttons, select "Web Service" for "Submit to"&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;18) Add a data connection, paste the URL of your web service in the location box:&lt;/DIV&gt;
&lt;DIV&gt;&lt;IMG src="http://storage.msn.com/x1pk64-9H0OKxRXxIzLauh3BGXyiQen_LTtO92JU8TJ3W0SDCTvwYK5QjslM_3ZvOdouNe_FsvT6JGce0gMWqXfO8Q2AOWuhMVujn4IFnzlweUqIL3chgP6gA-KVvl2TKRWyR4h1yV6vul_lmOHOctpYg"&gt; &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;19) Next, then select the operation for your submit form action, then Next &amp;gt; again:&lt;/DIV&gt;
&lt;DIV&gt;&lt;IMG src="http://storage.msn.com/x1pk64-9H0OKxRXxIzLauh3BGXyiQen_LTtO92JU8TJ3W0gY8lNhIFweMuV-H8JFgmSvILTdgP0SSairyOBhHDsG_M9EsHqRTj_rrb4E7E9gj4ihHpRyGBM5AiR7Fl8V4Fj2dWTHzWNo8I_9xo8ndC6-g"&gt; &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;20) The next dialog will prompt to match the form's submission to the web method's parameter. Select "Field or group" then click the node button to the right of the text box:&lt;/DIV&gt;
&lt;DIV&gt;&lt;IMG src="http://storage.msn.com/x1pk64-9H0OKxRXxIzLauh3BGXyiQen_LTtO92JU8TJ3W25VxNHoFBezLj4CAH5L1pYHcOaWFeKdCGlpYH0OpOvBkrZ87L7MKTnq_F-zM69EyF6uSnm-x7UsvnBJozmsRDEHsXABbcLT_uJ0Q_7st91_g"&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;21) Select the myFields node, then click "OK"&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;22) Select to Include the XML Subtree, including selected element&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;23) Next, Finish, then OK&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;24) Publish your form&lt;/DIV&gt;
&lt;DIV xmlns="http://www.w3.org/1999/xhtml"&gt;25) Now, when users fill out the form, they can save it to their local drive as an XML file, or submit it to your web service. &lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=490200" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/philoj/archive/tags/InfoPath/default.aspx">InfoPath</category></item><item><title>Stupid SQL Tricks</title><link>http://blogs.msdn.com/philoj/archive/2005/10/20/483240.aspx</link><pubDate>Fri, 21 Oct 2005 01:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:483240</guid><dc:creator>philoj</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/philoj/comments/483240.aspx</comments><wfw:commentRss>http://blogs.msdn.com/philoj/commentrss.aspx?PostID=483240</wfw:commentRss><description>&lt;P&gt;Argh.&lt;/P&gt;
&lt;P&gt;Classic &lt;A href="http://en.wikipedia.org/wiki/Schroedinbug"&gt;Schroedinbug&lt;/A&gt;. I had an outer join between two tables to populate an InfoPath &lt;a href="http://blogs.msdn.com/infopath/archive/2004/04/01/106039.aspx"&gt;multi-select listbox&lt;/A&gt;. (So I needed a list of potential options with indications of which options had been selected). I created an outer join and put my parameter in the WHERE clause, like this:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Andale Mono'; mso-bidi-font-family: 'Andale Mono'"&gt;SELECT dbo.NeedRequestType.NeedRequestID, &lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Andale Mono'; mso-bidi-font-family: 'Andale Mono'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;dbo.NeedType.NeedTypeID, &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Andale Mono'; mso-bidi-font-family: 'Andale Mono'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;dbo.NeedType.NeedType, &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Andale Mono'; mso-bidi-font-family: 'Andale Mono'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;dbo.NeedCategory.NeedCategory&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Andale Mono'; mso-bidi-font-family: 'Andale Mono'"&gt;FROM dbo.NeedCategory LEFT OUTER JOIN dbo.NeedType &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Andale Mono'; mso-bidi-font-family: 'Andale Mono'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;ON dbo.NeedCategory.NeedCategoryID = dbo.NeedType.NeedCategoryID &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Andale Mono'; mso-bidi-font-family: 'Andale Mono'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;LEFT OUTER JOIN dbo.NeedRequestType &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Andale Mono'; mso-bidi-font-family: 'Andale Mono'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;ON dbo.NeedType.NeedTypeID = dbo.NeedRequestType.NeedTypeID&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Andale Mono'; mso-bidi-font-family: 'Andale Mono'"&gt;WHERE (dbo.NeedRequestType.NeedRequestID = 11) &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Andale Mono'; mso-bidi-font-family: 'Andale Mono'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;OR (dbo.NeedRequestType.NeedRequestID IS NULL)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;The interesting thing is that when you don't have much test data, this works. The WHERE clause combined with the outer join effectively selects "orphan" records out of the reference table. But as the number of "orphans" drops (by being selected), so do the number of records returned, until you only get the records that match your parameter ID (in this case, 11). &lt;/P&gt;
&lt;P&gt;The &lt;EM&gt;proper&lt;/EM&gt; syntax is:&lt;/P&gt;
&lt;DIV dir=ltr align=left&gt;&lt;SPAN class=940442022-20102005&gt;&lt;FONT face="Courier New" size=2&gt;SELECT&amp;nbsp;&amp;nbsp;dbo.NeedRequestType.NeedRequestID&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,dbo.NeedType.NeedTypeID&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,dbo.NeedType.NeedType&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,dbo.NeedCategory.NeedCategory&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face="Courier New"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV dir=ltr align=left&gt;&lt;SPAN class=940442022-20102005&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;FROM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dbo.NeedType &lt;BR&gt;&amp;nbsp;JOIN&amp;nbsp;&amp;nbsp;&amp;nbsp; dbo.NeedCategory&lt;BR&gt;&amp;nbsp;&amp;nbsp; ON&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dbo.NeedCategory.NeedCategoryID = dbo.NeedType.NeedCategoryID &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face="Courier New"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV dir=ltr align=left&gt;&lt;SPAN class=940442022-20102005&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;LEFT OUTER JOIN&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dbo.NeedRequestType &lt;BR&gt;&amp;nbsp;&amp;nbsp; ON&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dbo.NeedType.NeedTypeID = dbo.NeedRequestType.NeedTypeID&lt;BR&gt;&amp;nbsp;&amp;nbsp; AND&amp;nbsp;&amp;nbsp;&amp;nbsp;dbo.NeedRequestType.NeedRequestID = 11 &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV dir=ltr align=left&gt;&lt;SPAN class=940442022-20102005&gt;&lt;FONT face="Courier New" size=2&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV dir=ltr align=left&gt;&lt;SPAN class=940442022-20102005&gt;Ah well, live and learn. &lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV dir=ltr align=left&gt;&lt;SPAN class=940442022-20102005&gt;Philo&lt;/SPAN&gt;&lt;/DIV&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=483240" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/philoj/archive/tags/InfoPath/default.aspx">InfoPath</category></item><item><title>Emailing a different InfoPath form</title><link>http://blogs.msdn.com/philoj/archive/2005/04/25/411972.aspx</link><pubDate>Tue, 26 Apr 2005 01:33:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:411972</guid><dc:creator>philoj</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/philoj/comments/411972.aspx</comments><wfw:commentRss>http://blogs.msdn.com/philoj/commentrss.aspx?PostID=411972</wfw:commentRss><description>&lt;P&gt;I recently needed to create an InfoPath form that enabled the user to post the data to another user in a format they could open in *their* InfoPath form. After some thought, I went with the idea of running an XSL transform on the data and posting it via an email connector. &lt;/P&gt;
&lt;P&gt;Of course, first I needed to create the XSLT. Obviously you can do this in notepad, but I prefer tools that are less likely to make my eyes bleed. I chose to go with Altova's &lt;A href="http://www.altova.com/products_mapforce.html"&gt;MapForce&lt;/A&gt;&amp;nbsp;- it's a great visual designer for mapping one schema to another:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.textamerica.com/user.images.x/92/IMG_465392/_0425/TZ20042517505446.jpg?refresh="&gt; &lt;/P&gt;
&lt;P&gt;I extracted the form files from each InfoPath form and loaded the myschema.xsd files as source and destination. MapForce handled most of the mapping, connecting similarly-named nodes. Then I generated the XSLT. I had to do a quick edit on the XSL to provide the processing instructions and pull out the schemaLocation attribute on the root. (You can probably do this in MapForce too, but I was in a rush...)&lt;/P&gt;
&lt;P&gt;So, next thing - add the xslt to the form as a data connection. You want to create a data connection that will Receive Data from an XML file - then you can select your XSLT file and add it as a resource. &lt;/P&gt;
&lt;P&gt;Now create a data connection to submit the form via email - set properties as needed. &lt;/P&gt;
&lt;P&gt;Add a button and add form code - I'm working in jscript so that I didn't need a fully trusted form. &lt;/P&gt;
&lt;P&gt;The final step, add the following code:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#006400&gt;//Get the current form data&lt;/FONT&gt;&lt;BR&gt;var CurrentForm=XDocument.DOM;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#006400&gt;//Get the transform&lt;/FONT&gt;&lt;BR&gt;var XSLTFileDOM=XDocument.GetDOM("MTCXSLT");&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&lt;FONT color=#006400&gt;//Initialize the final xml DOM&lt;/FONT&gt;&lt;BR&gt;var tmpDOM=new ActiveXObject("MSXML2.DomDocument.5.0");&lt;BR&gt;tmpDOM.validateOnParse=true;&lt;BR&gt;tmpDOM.async=false;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#006400&gt;//Perform the transform; strDOM gets the XML String&lt;/FONT&gt;&lt;BR&gt;var strDOM=CurrentForm.transformNode(XSLTFileDOM);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#006400&gt;//Load the XML String from above into our DOM variable&lt;/FONT&gt;&lt;BR&gt;tmpDOM.loadXML(strDOM);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#006400&gt;//Post the DOM via email. &lt;BR&gt;&lt;/FONT&gt;XDocument.DataAdapters("SubmitToMTC").SubmitData(tmpDOM);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Voila! &lt;/P&gt;
&lt;P&gt;Philo&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=411972" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/philoj/archive/tags/Developer/default.aspx">Developer</category><category domain="http://blogs.msdn.com/philoj/archive/tags/InfoPath/default.aspx">InfoPath</category></item><item><title>Creating a Structured Product Labeling Editor</title><link>http://blogs.msdn.com/philoj/archive/2004/06/06/149441.aspx</link><pubDate>Sun, 06 Jun 2004 08:16:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:149441</guid><dc:creator>philoj</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/philoj/comments/149441.aspx</comments><wfw:commentRss>http://blogs.msdn.com/philoj/commentrss.aspx?PostID=149441</wfw:commentRss><description>&lt;P&gt;The challenge: use &lt;a title="" href="http://office.microsoft.com/home/office.aspx?assetid=FX01085792" target="_blank"&gt;InfoPath&lt;/a&gt; to create an editor for the Structured Product Labeling (SPL) subset of the &lt;A href="http://www.hl7.org/"&gt;HL7&lt;/A&gt;&amp;nbsp;Clinical Document Architecture (CDA) schema. &lt;/P&gt;
&lt;P&gt;I've done quite a bit of document-centric work, and my philosophy has always been to design an XML schema first, because from an xsd, all other things can flow:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;InfoPath can generate forms from schema &lt;/LI&gt;
&lt;LI&gt;BizTalk can generate maps from schema&lt;/LI&gt;
&lt;LI&gt;There are EDI tools to generate implementation guides from schema&lt;/LI&gt;
&lt;LI&gt;XMLSpy can generate databases and code from schema&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;So when I was told there was an &lt;A href="http://www.hl7.org/Library/Committees/rcrim/SPL%20Ballot%20Package%5FDSTU%5FDec2003%5Ffinal%2Ezip"&gt;SPL schema&lt;/A&gt; to work from, I figured this was a one-day job, tops.&lt;/P&gt;
&lt;P&gt;I was wrong.&lt;/P&gt;
&lt;P&gt;Here's what a &lt;A href="http://www.radix.net/~philo/images/SPLLabel.gif" target=_blank&gt;drug label&lt;/A&gt; usually looks like in the physical form. Now, one of the great features of InfoPath is that you can just point it at an xml schema and get a form out of it. However, doing this with the &lt;A href="http://www.radix.net/~philo/PORR_MT050015.xsd" target=_blank&gt;SPL Schema&lt;/A&gt;&amp;nbsp;(this isn't complete - the included files aren't there; see the SPL schema link for the whole schema) yields a pretty &lt;A href="http://www.radix.net/~philo/images/SPLInfoPath.gif" target=_blank&gt;unsatisfying result&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;The problem is that the schema has a whole lot of metadata, and what is there for content is just markup, like HTML (imagine trying to autogenerate a form from the schema for xhtml - it doesn't reflect how people really use the schema). &lt;/P&gt;
&lt;P&gt;This is, of course, in retrospect. Going in, I couldn't get the hang of why the form wasn't getting me where I needed to go. It wasn't until I looked at the sample &lt;A href="http://www.radix.net/~philo/SampleDoc.xml"&gt;SPL XML&lt;/A&gt; - that's when the markup concept clicked and I started looking at the SPL schema as a destination instead of a source. &lt;/P&gt;
&lt;P&gt;Another consideration is that the SPL Schema serves the label, not the drug or the company. What this means is that the information in the schema is geared towards describing the medication, but there may be additional information regarding the drug, the label editing and approval process, or other considerations that the pharmaceutical company wants stored with the label. &lt;/P&gt;
&lt;P&gt;These two considerations indicate that the label is best served by using an authoring schema to store the information and generating the SPL XML from that schema. Since InfoPath natively stores its data in XML, the InfoPath schema can serve as an authoring schema nicely. (Alternatively, if the pharma already has a business system in place to store SPL-type information, InfoPath can be designed to interact with that system)&lt;/P&gt;
&lt;P&gt;So - next week we'll lay out an InfoPath form to serve the label, designed from a blank form to save directly to XML.&lt;/P&gt;
&lt;P&gt;Philo&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=149441" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/philoj/archive/tags/Developer/default.aspx">Developer</category><category domain="http://blogs.msdn.com/philoj/archive/tags/InfoPath/default.aspx">InfoPath</category></item><item><title>Healthcare / HL7 solution</title><link>http://blogs.msdn.com/philoj/archive/2004/06/04/148474.aspx</link><pubDate>Fri, 04 Jun 2004 17:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:148474</guid><dc:creator>philoj</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/philoj/comments/148474.aspx</comments><wfw:commentRss>http://blogs.msdn.com/philoj/commentrss.aspx?PostID=148474</wfw:commentRss><description>&lt;P&gt;Over the next few days I'll be posting a series of articles covering my trials and tribulations in creating an &amp;#8220;HL7 Generator&amp;#8221; - specifically using &lt;A title="" href="http://office.microsoft.com/home/office.aspx?assetid=FX01085792" target=_blank&gt;InfoPath&lt;/A&gt; to generate XML in the Structured Product Label format, which is a subset of the Clinical Document Architecture. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.radix.net/~philo/images/SPLFinishedForm.gif"&gt;Here&lt;/A&gt;&amp;nbsp;is an image of the (nearly) completed form.&lt;/P&gt;
&lt;P&gt;As usual, it turns out the best approach was to look at it sideways...&lt;/P&gt;
&lt;P&gt;Here's an (updated) approximate schedule of the articles:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT color=#000080&gt;6/7/2004&lt;/FONT&gt;: &lt;A href="http://blogs.msdn.com/philoj/archive/2004/06/06.aspx"&gt;Analysis and SPL overview &lt;/A&gt;
&lt;LI&gt;&lt;FONT color=#000080&gt;7/12/2004&lt;/FONT&gt;: Form Design 
&lt;LI&gt;&lt;FONT color=#000080&gt;7/19/2004&lt;/FONT&gt;: Code 
&lt;LI&gt;&lt;FONT color=#000080&gt;7/26/2004&lt;/FONT&gt;: XSLT and views 
&lt;LI&gt;&lt;FONT color=#000080&gt;8/2/2004&lt;/FONT&gt;: Task pane&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Of course, this is subject to change as I write...&lt;/P&gt;
&lt;P&gt;Philo&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=148474" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/philoj/archive/tags/Developer/default.aspx">Developer</category><category domain="http://blogs.msdn.com/philoj/archive/tags/InfoPath/default.aspx">InfoPath</category></item><item><title>InfoPath Context Sensitive Help</title><link>http://blogs.msdn.com/philoj/archive/2004/04/25/119926.aspx</link><pubDate>Sun, 25 Apr 2004 23:10:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:119926</guid><dc:creator>philoj</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/philoj/comments/119926.aspx</comments><wfw:commentRss>http://blogs.msdn.com/philoj/commentrss.aspx?PostID=119926</wfw:commentRss><description>&lt;P&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyId=D5ADC839-73F4-4299-ABA0-E88C90B25144&amp;amp;displaylang=en"&gt;&lt;A title="" href="http://office.microsoft.com/home/office.aspx?assetid=FX01085792"&gt;InfoPath&lt;/A&gt; SP1&lt;/A&gt;&amp;nbsp;(&lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyId=D5ADC839-73F4-4299-ABA0-E88C90B25144&amp;amp;displaylang=en"&gt;public beta &lt;/A&gt;at the link; final due out this summer) includes a lot of cool changes, both in the UI and behind the scenes (most notably the ability to stuff managed code behind the form). First I'm going to cover the OnContextChange event and using it to create context-sensitive help.&lt;/P&gt;
&lt;P&gt;To create a managed code InfoPath form, you need to download the &lt;A href="http://www.microsoft.com/downloads/details.aspx?familyid=7E9EBC57-E115-4CAC-9986-A712E22879BB&amp;amp;displaylang=en"&gt;InfoPath Toolkit for Visual Studio .Net&lt;/A&gt;&amp;nbsp;&lt;/A&gt;- this provides the templates for InfoPath in VS. Once installed, open Visual Studio, create a new project, select Microsoft Office InfoPath Projects, then either &amp;#8220;Visual Basic Projects&amp;#8221; or &amp;#8220;Visual C# Projects&amp;#8221; (I'll be using C#), and &amp;#8220;InfoPath Form Template&amp;#8221; from the &amp;#8220;Templates&amp;#8221; pane. &lt;/P&gt;
&lt;P&gt;Name your project, click &amp;#8220;OK&amp;#8221; and you've got an InfoPath project and form. (Also notice that under the &amp;#8220;Project&amp;#8221; menu in Visual Studio you've got some new InfoPath commands, most notably &amp;#8220;Open InfoPath&amp;#8221; for those times you close the form designer)&lt;/P&gt;
&lt;P&gt;So, for our context-sensitive help we're going to need an HTML file containing the help. Create your file - all you really need to do is append all the help paragraphs/articles into a single file. The way I handled context sensitivity is to wrap each help segment into a DIV, then hide all the DIVs and show the appropriate DIV based on the control selected. Other possibilities include using HTML anchors and scrolling to the anchor for the article, or even creating a document with an empty DIV, then pulling the text from another location and dynamically inserting it into the document. &lt;/P&gt;
&lt;P&gt;So, I have an HTML document with a series of DIVs. I used FrontPage 2003 because I found the layer handling helped out a lot. (View | Task Pane, then in the Task Pane menu at the top select &amp;#8220;Layers&amp;#8221;) You'll want each layer/DIV to use the following tag:&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#808080 size=2&gt;&amp;lt;div style="position: absolute; visibility: hidden; left: 0px; top: 0px" id="[Name]"&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;For [Name] use the control name for the control you want the DIV associated with. &lt;/P&gt;
&lt;P&gt;[Thanks to Josh Bertsch for help with the following code, C# and jscript]&lt;/P&gt;
&lt;P&gt;Now add the following jscript to the &amp;lt;HEAD&amp;gt; of the file:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#808080 size=2&gt;&amp;lt;script&amp;gt;&lt;BR&gt;&amp;nbsp;var g_anchor="";&lt;BR&gt;&amp;nbsp;function waitForContext(anchor)&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;g_anchor=anchor;&lt;BR&gt;&amp;nbsp;&amp;nbsp;window.setTimeout("setTaskPaneLoc();", 1000);&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;function setTaskPaneLoc(aLoc)&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;var aLoc=g_anchor;&lt;BR&gt;&amp;nbsp;&amp;nbsp;var aCol=document.all.tags("DIV");&lt;BR&gt;&amp;nbsp;&amp;nbsp;var aColLen=aCol.length;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;var anchorNames="";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;for(var i=0; i&amp;lt;aColLen; i++)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;anchorNames+=aCol[i].id + "; ";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(aCol[i].id==aLoc)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;aCol[i].style.visibility="visible";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;aCol[i].style.visibility="hidden";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;&amp;lt;/script&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;This will, after a 1-second pause, zip through the DIV tags in the file, showing the one whose ID is the same as the control name, and hiding the rest. &lt;/P&gt;
&lt;P&gt;Once you're happy with the file, in InfoPath go to Tools | Form Options, then the Advanced tab. In the &amp;#8220;Custom Task Pane&amp;#8220; section check &amp;#8220;Enable custom task pane&amp;#8221;, then click the &amp;#8220;Resource Files&amp;#8220; button and add your file. (NOTE: if you change your help file later, you'll have to go to this option, remove the file and add it again, otherwise you won't see your changes). Once you've added the file, then it should be available in the drop-down for &amp;#8220;Task pane location&amp;#8220; - select it. &lt;/P&gt;
&lt;P&gt;Now, in InfoPath go to the Tools Menu, Programming, and click &amp;#8220;On Context Change Event&amp;#8220; - this will create and take you to the OnContextChange event handler in the VS.Net IDE. &lt;/P&gt;
&lt;P&gt;Add a reference in the project to Microsoft.mshtml.&lt;/P&gt;
&lt;P&gt;Use this code in your OnContextChange handler:&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT color=#808080&gt;&lt;FONT face="Courier New"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; (e.Type == "ContextNode")&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#808080 size=2&gt;{&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT color=#808080&gt;&lt;FONT face="Courier New"&gt;string&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; aLoc=e.Context.nodeName;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#808080 size=2&gt;aLoc=aLoc.Replace("my:", "");&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#808080 size=2&gt;HTMLTaskPaneObject taskPane=(HTMLTaskPaneObject)thisXDocument.View.Window.TaskPanes[0];&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#808080 size=2&gt;mshtml.HTMLWindow2Class window=(mshtml.HTMLWindow2Class)taskPane.HTMLDocument.Script;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#808080 size=2&gt;window.execScript("waitForContext('" + aLoc + "')", "JScript");&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#808080 size=2&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;That should do it - now just remember that the DIV id has to be the same as the name of the control. Also watch out for width/height definitions on the DIVs - best to just let the task pane do the formatting. &lt;/P&gt;
&lt;P&gt;Philo&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=119926" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/philoj/archive/tags/Developer/default.aspx">Developer</category><category domain="http://blogs.msdn.com/philoj/archive/tags/InfoPath/default.aspx">InfoPath</category></item><item><title>Why Smart Clients?</title><link>http://blogs.msdn.com/philoj/archive/2004/03/16/90636.aspx</link><pubDate>Tue, 16 Mar 2004 22:23:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:90636</guid><dc:creator>philoj</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/philoj/comments/90636.aspx</comments><wfw:commentRss>http://blogs.msdn.com/philoj/commentrss.aspx?PostID=90636</wfw:commentRss><description>&lt;P&gt;... or &amp;#8220;Why is my client so fat?&amp;#8221; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://office.microsoft.com/home/office.aspx?assetid=FX01085792"&gt;InfoPath&lt;/A&gt; is really cool. To some degree, it actually delivers on the ancient promise of &amp;#8220;productivity without programmers.&amp;#8221; Fundamentally, it's a form design and publication tool - end users can design forms and publish them to a server where the people who need to fill out the form can access it, fill in the data, and submit the data to a predefined data store.&lt;/P&gt;
&lt;P&gt;When combined with &lt;A href="http://www.microsoft.com/sharepoint/"&gt;SharePoint&lt;/A&gt;, there is generally no reason a developer needs to be involved at all - users can lay out forms, create lookups, create *cascading* lookups, add validation, and so on. If the data is simply to be aggregated in a SharePoint forms library, the whole thing is &lt;A href="http://www.sciencecartoonsplus.com/gallery.htm"&gt;automagical&lt;/A&gt; and can be queried directly at the end.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;I&lt;/EM&gt; think it's a wonderful thing for developers because personally I find building generic forms for standard business data collection somewhat, uh, &lt;A href="http://bau2.uibk.ac.at/sg/python/Scripts/Crimson/jpgs/galley.jpg"&gt;tedious&lt;/A&gt;. I'd much rather be solving larger business problems and inventing the next bread slicer. &lt;/P&gt;
&lt;P&gt;&amp;#8220;But Philo,&amp;#8221; you ask, &amp;#8220;what does this have to do with fat, er, smart clients?&amp;#8221;&lt;/P&gt;
&lt;P&gt;Simple - the #1 question regarding InfoPath is &amp;#8220;does everyone need InfoPath on the desktop to use an InfoPath form?&amp;#8221;&lt;/P&gt;
&lt;P&gt;The answer is &amp;#8220;it depends.&amp;#8221; &lt;/P&gt;
&lt;P&gt;Since InfoPath is all XML based (the form definitions are saved in a cab file, but fundamentally they're an XML Schema; the form data is an XML document with a pointer to the XSD), then no - you could easily write an ASP.Net page or a Windows forms client that uses the form XSD to generate the form data in a properly-formatted XML document. But that's not really what the questioner is asking - they want to know &amp;#8220;can people without InfoPath on their desktop use the InfoPath forms with no additional coding?&amp;#8221;&lt;/P&gt;
&lt;P&gt;Think about it - boil that question down and it's &amp;#8220;can we get all the InfoPath functionality without InfoPath?&amp;#8221; To which the polite answer is &amp;#8220;no.&amp;#8221;&lt;/P&gt;
&lt;P&gt;Why not?&lt;/P&gt;
&lt;P&gt;Anyone who's done web development has faced this question: &amp;#8220;Can we have spell checking in this data entry form?&amp;#8221; Often this happens on a contract where one delivery requirement is for complete client-side validation. Well, in essence this means that every time someone downloads the form, they need to download a dictionary as well. Rich text formatting, validation, spell-checking - these are all requirements we've faced, and we've either bought tools or coded them ourselves. &lt;/P&gt;
&lt;P&gt;This means: &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Additional development cost 
&lt;LI&gt;Additional testing cost 
&lt;LI&gt;For web-based clients, additional download sizes (often massive ones)&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;InfoPath offers a rich platform for end users to create forms on that provides the full power of the Word libraries (spell checking, grammar checking, rich formatting), a solid client-side validation model, .Net-based code behind (in SP1, download the &lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyId=D5ADC839-73F4-4299-ABA0-E88C90B25144&amp;amp;displaylang=en"&gt;preview&lt;/A&gt;), and &lt;EM&gt;offline capability&lt;/EM&gt;. That's right - a web-aware solution that works in an offline mode, no additional code on your part necessary. &lt;/P&gt;
&lt;P&gt;[One caveat in here is where the data goes. As I mentioned above, if the data is going into SharePoint, the end user can build the whole thing. If it needs to go into a business system, the IT Department may have to get involved to provide the data consumer. InfoPath consumes web services &lt;EM&gt;very&lt;/EM&gt; nicely, in keeping with a &lt;A href="http://www.service-architecture.com/"&gt;service-oriented architecture&lt;/A&gt;.]&lt;/P&gt;
&lt;P&gt;Web-based solutions definitely have a place, and the open architecture of InfoPath forms even allows web-enabling data entry and/or display of the form itself. But when you're talking about robust data entry requirements, web-based solutions generally run out of steam quickly. The client wants a form with spell-checking, client-side validation, offline capability, etc, etc, etc. You can build it, but it's going to be pricy, and it only solves one problem. &lt;/P&gt;
&lt;P&gt;InfoPath gives developers the ability to let clients create their own forms with little or no developer intervention, and allows developers to move on to solving bigger and better problems. So you have to ask yourself how you'd rather spend your day: &amp;#8220;Hey John, can you move these three fields five pixels to the right?&amp;#8221; or &amp;#8220;We need someone to build a proof of concept for the new smart phone client the Operations Department needs&amp;#8221; ?&lt;/P&gt;
&lt;P&gt;Learn more about how developers can add value to InfoPath solutions with the &lt;A href="http://msdn.microsoft.com/office/understanding/infopath/devdocs/ipdevreskit/default.aspx"&gt;InfoPath Developer Resources Kit&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Philo&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=90636" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/philoj/archive/tags/InfoPath/default.aspx">InfoPath</category><category domain="http://blogs.msdn.com/philoj/archive/tags/Non-Tech/default.aspx">Non-Tech</category><category domain="http://blogs.msdn.com/philoj/archive/tags/Smart+Documents/default.aspx">Smart Documents</category></item></channel></rss>