<?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>David Fries' WebLog : InfoPath</title><link>http://blogs.msdn.com/davfries/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>Status Reports in InfoPath (Part II)</title><link>http://blogs.msdn.com/davfries/archive/2004/10/03/237415.aspx</link><pubDate>Mon, 04 Oct 2004 06:13:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:237415</guid><dc:creator>davfries</dc:creator><slash:comments>7</slash:comments><comments>http://blogs.msdn.com/davfries/comments/237415.aspx</comments><wfw:commentRss>http://blogs.msdn.com/davfries/commentrss.aspx?PostID=237415</wfw:commentRss><description>&lt;p&gt;Due to the overwhelming number of requests&amp;nbsp;(3+) for screenshots and code for the Status Report&amp;nbsp;&lt;A href="http://blogs.msdn.com/davfries/archive/2004/09/28/235307.aspx"&gt;described in a previous post&amp;nbsp;&lt;/a&gt;, I've decided to make them publicly available. My only request is that you let me know how I can improve the form.&lt;/p&gt; &lt;p&gt;Here is the "Individual View":&lt;/p&gt; &lt;p&gt;&lt;img src="http://www.jdpapas.com/blogfiles/StatusReport/Screen1.jpg" /&gt;&lt;/p&gt; &lt;p&gt;It uses a Master-Detail control for viewing multiple Status Reports at once.&lt;/p&gt; &lt;p&gt;Here's the "Team View"&lt;/p&gt; &lt;p&gt;&lt;img src="http://www.jdpapas.com/blogfiles/StatusReport/Screen2.jpg" /&gt;&lt;/p&gt; &lt;p&gt;It groups things by section, rather than by person. I had to use a secondary data source and some scripting to get this to work. Perhaps someone can come up with a more elegant solution.&lt;/p&gt; &lt;p&gt;Here is the original &lt;a href="http://www.jdpapas.com/blogfiles/StatusReport/StatusReport.zip"&gt;form template&lt;/a&gt;. Also included are the two data sources (Access databases) that the form depends on. &lt;/p&gt; &lt;p&gt;A couple of notes on running this form: &lt;/p&gt; &lt;ol&gt; &lt;li&gt;I created an access database for the form to run in, but the form is currently hardcoded to look for the Access DB at C:\StatusReport\. Unzip the files to that location for the form to run properly. When you deploy the form to users, you should put the Access DB in a shared location, or use SQL Server. &lt;li&gt;The original form uses a &lt;A href="http://blogs.msdn.com/davfries/archive/2004/06/29/169043.aspx"&gt;Web Service to get the current user name&lt;/a&gt;. I had to remove this in order for this form to be functional, and I replaced it with a call to the WScript.Network ActiveX control. Unfortunately, this ActiveX control is unsafe, and requires the form to be Fully Trusted. Until you get your own web service written, you can test the functionality of the form by opening it in the Designer and Previewing.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;If you have any questions or problems, let me know.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=237415" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/davfries/archive/tags/InfoPath/default.aspx">InfoPath</category></item><item><title>Status Reports in InfoPath</title><link>http://blogs.msdn.com/davfries/archive/2004/09/28/235307.aspx</link><pubDate>Tue, 28 Sep 2004 17:21:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:235307</guid><dc:creator>davfries</dc:creator><slash:comments>8</slash:comments><comments>http://blogs.msdn.com/davfries/comments/235307.aspx</comments><wfw:commentRss>http://blogs.msdn.com/davfries/commentrss.aspx?PostID=235307</wfw:commentRss><description>&lt;p&gt;When I transitioned from the InfoPath team to the CLR team, I wanted to take some of my knowledge of InfoPath and put it to good use here. After browsing the intranet sites, I noticed that there had been several different attempts at designing a status reports system. While InfoPath isn't the right tool for every situation, status reports are a perfect fit.&lt;/p&gt; &lt;p&gt;The status reports system I designed for my team has the following features:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;SQL Server 2000 backend&lt;/li&gt; &lt;li&gt;Auto-detection of employee name, manager name (from a &lt;A href="http://blogs.msdn.com/davfries/archive/2004/06/29/169043.aspx"&gt;web service&lt;/a&gt;) &lt;/li&gt; &lt;li&gt;Unfinished and new items from previous week are automatically populated for the current week&lt;/li&gt; &lt;li&gt;Validation so that submission can only happen on Fridays (makes it easy to query later) &lt;/li&gt; &lt;li&gt;Query by employee, manager, team, or date.&lt;/li&gt; &lt;li&gt;Master-detail view for viewing multiple status reports.&lt;/li&gt; &lt;li&gt;Roll-up view (displayed by section, not person) for viewing &lt;/li&gt; &lt;li&gt;Color schemes for the different views to make them&amp;nbsp;easily distinguishable&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;If anyone's interested, I can post some sceenshots and/or code up.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=235307" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/davfries/archive/tags/InfoPath/default.aspx">InfoPath</category></item><item><title>InfoPath SP1 SDK released</title><link>http://blogs.msdn.com/davfries/archive/2004/08/07/210709.aspx</link><pubDate>Sun, 08 Aug 2004 00:46:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:210709</guid><dc:creator>davfries</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/davfries/comments/210709.aspx</comments><wfw:commentRss>http://blogs.msdn.com/davfries/commentrss.aspx?PostID=210709</wfw:commentRss><description>&lt;p&gt;Get it here...before it gets you!!!&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=351F0616-93AA-4FE8-9238-D702F1BFBAB4&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=351F0616-93AA-4FE8-9238-D702F1BFBAB4&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=210709" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/davfries/archive/tags/InfoPath/default.aspx">InfoPath</category></item><item><title>Repeating, Multiply-Cascading, Dropdown Listboxes with Unique Entries in InfoPath</title><link>http://blogs.msdn.com/davfries/archive/2004/07/29/200559.aspx</link><pubDate>Thu, 29 Jul 2004 11:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:200559</guid><dc:creator>davfries</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/davfries/comments/200559.aspx</comments><wfw:commentRss>http://blogs.msdn.com/davfries/commentrss.aspx?PostID=200559</wfw:commentRss><description>&lt;P&gt;First, a few definitions:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Repeating&lt;/STRONG&gt;: Inside of a Repeating Section or Repeating Table control&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Cascading Dropdown Listboxes: &lt;/STRONG&gt;This is where the selection in one dropdown listbox causes the available items in another dropdown listbox to be updated. For example, If I choose &amp;#8220;Ford&amp;#8221; for the &amp;#8220;Make: &amp;#8220; dropdown listbox, the &amp;#8220;Model: &amp;#8220; dropdown listbox will be updated to only show vehicles made by Ford.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Multiply-Cascading Dropdown Listboxes: &lt;/STRONG&gt;That's pronounced &lt;EM&gt;mull-tih-plee,&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;and is a term that I made up.&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;This is similar to the previous concept, but this allows you to choose an item from any one of multiple dropdown listboxes, and it will filter out the values in all other dropdown listboxes.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Unique Entries:&lt;/STRONG&gt; Any duplicate items for the dropdown listbox will be filtered out.&lt;/P&gt;
&lt;P&gt;Ok, now down to business:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The scenario&lt;/STRONG&gt;: You have a photo album&amp;nbsp;that allows viewing photos in groups&amp;nbsp;based on selections in dropdown listboxes. You have information about each photo's title, date, location, and web URL. When you select a value from one of the dropdowns (say, location = &amp;#8220;Denver&amp;#8220;) then you want all the other dropdowns to filter themselves&lt;/P&gt;
&lt;P&gt;First, let's describe an XSD file which&amp;nbsp;you will base your form off of.&amp;nbsp;(photoalbum.xsd):&lt;/P&gt;
&lt;P style="BORDER-RIGHT: brown 5px groove; BORDER-TOP: brown 5px groove; MARGIN-LEFT: 25px; BORDER-LEFT: brown 5px groove; MARGIN-RIGHT: 0px; BORDER-BOTTOM: brown 5px groove"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&amp;gt;&lt;BR&gt;&amp;lt;xsd:schema targetNamespace="http://schemas.microsoft.com/office/infopath/2003/myXSD/2000-01-01T12:00:00" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2000-01-01T12:00:00" xmlns:q="http://schemas.microsoft.com/office/infopath/2003/ado/queryFields" xmlns:d="http://schemas.microsoft.com/office/infopath/2003/ado/dataFields" xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsd:element name="myFields"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsd:complexType&amp;gt;&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;lt;xsd:sequence&amp;gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsd:element ref="my:PhotoAlbum" minOccurs="0"/&amp;gt;&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;lt;/xsd:sequence&amp;gt;&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;lt;xsd:anyAttribute processContents="lax" namespace="http://www.w3.org/XML/1998/namespace"/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xsd:complexType&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xsd:element&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsd:element name="PhotoAlbum"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsd:complexType&amp;gt;&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;lt;xsd:sequence&amp;gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsd:element ref="my:Photo" minOccurs="0" maxOccurs="unbounded"/&amp;gt;&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;lt;/xsd:sequence&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xsd:complexType&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xsd:element&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsd:element name="Photo"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsd:complexType&amp;gt;&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;&amp;nbsp; &amp;lt;xsd:sequence&amp;gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsd:element ref="my:Title" minOccurs="0"/&amp;gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsd:element ref="my:Location" minOccurs="0"/&amp;gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsd:element ref="my:WebSite" minOccurs="0"/&amp;gt;&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;&amp;nbsp;&amp;nbsp; &amp;lt;/xsd:sequence&amp;gt;&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;lt;/xsd:complexType&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xsd:element&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsd:element name="Title" type="xsd:string"/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsd:element name="Location" type="xsd:string"/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsd:element name="WebSite" type="xsd:string"/&amp;gt;&lt;BR&gt;&amp;lt;/xsd:schema&amp;gt;&lt;/P&gt;
&lt;P&gt;Use this schema, and create a new form from Data Source.&lt;/P&gt;
&lt;P&gt;Right click on the Photo node in your data source, and insert a Repeating Table control.&lt;/P&gt;
&lt;P&gt;Right click on each of the textboxes in the table columns, and convert them to dropdown listboxes.&lt;/P&gt;
&lt;P&gt;Now that you've gotten your form layout mostly node, let's add an XML file that will serve as the data source for the items in each of the dropdown listboxes:&lt;/P&gt;
&lt;P&gt;Here is some sample XML to use (Event.xml):&lt;/P&gt;
&lt;P style="BORDER-RIGHT: brown 5px groove; BORDER-TOP: brown 5px groove; MARGIN-LEFT: 25px; BORDER-LEFT: brown 5px groove; MARGIN-RIGHT: 0px; BORDER-BOTTOM: brown 5px groove"&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;PhotoAlbum&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Event Title="My Dog" Date="2004-10-31T12:00:00" Location="Redmond" Website="http://www.images.com/Dog" /&amp;gt;&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;lt;Event Title="My Parents" Date="2002-07-04T12:00:00" Location="New York" Website="http://www.images.com/Parents" /&amp;gt;&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;lt;Event Title="My School" Date="2001-01-01T12:00:00" Location="Denver" Website="http://www.images.com/School"/&amp;gt;&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;lt;Event Title="My Car" Date="2000-01-01T12:00:00" Location="New York" Website="http://www.images.com/Car"/&amp;gt;&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;lt;Event Title="My Ski Trip" Date="2005-01-01T12:00:00" Location="Denver" Website="http://www.images.com/Ski"/&amp;gt;&lt;BR&gt;&amp;lt;/PhotoAlbum&amp;gt;&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;Save this file somewhere, and then add it to your form as a resource (Tools-&amp;gt;Resource Manager). Name the secondary data source &amp;#8220;Event&amp;#8220;&lt;/P&gt;
&lt;P&gt;Now you can hook up the dropdown listboxes so that their items come from the &amp;#8220;Event&amp;#8221; data source.&lt;/P&gt;
&lt;P&gt;Now is where it gets a bit ugly. InfoPath doesn't have UI to create these magical cascading dropdown listboxes. However, you can edit the current view's xsl file in order to achieve the desired effect. In order to edit the XSL file, you'll need to Extract (File-&amp;gt;Extract Form Files) into a folder. Once you have your form extracted, you can edit the view1.xsl file like so:&lt;/P&gt;
&lt;P style="BORDER-RIGHT: brown 5px groove; BORDER-TOP: brown 5px groove; MARGIN-LEFT: 25px; BORDER-LEFT: brown 5px groove; MARGIN-RIGHT: 0px; BORDER-BOTTOM: brown 5px groove"&gt;&amp;lt;select class="xdComboBox xdBehavior_Select" title="" style="WIDTH: 100%" size="1" xd:CtrlId="CTRL7" xd:xctname="DropDown" value="" xd:boundProp="value" xd:binding="my:Title" tabIndex="0"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:attribute name="value"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:value-of select="my:Title"/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xsl:attribute&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:choose&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:when test="function-available('xdXDocument:GetDOM')"&amp;gt;&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;lt;option/&amp;gt;&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; &lt;FONT color=#ff0000&gt;&amp;lt;xsl:variable name="val" select="my:Title"/&amp;gt;&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;lt;xsl:variable name="loc" select="my:Location"/&amp;gt;&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;lt;xsl:variable name="web" select="my:WebSite"/&amp;gt;&lt;BR&gt;&lt;/FONT&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; &lt;FONT color=#ff0000&gt;&amp;lt;xsl:for-each select="xdXDocument:GetDOM(&amp;amp;quot;Event&amp;amp;quot;)/PhotoAlbum/Event/@Title[((&lt;/FONT&gt;&lt;A href="mailto:../@Location"&gt;&lt;FONT color=#ff0000&gt;../@Location&lt;/FONT&gt;&lt;/A&gt;&lt;FONT color=#ff0000&gt; = $loc) or $loc ='') and ((&lt;/FONT&gt;&lt;A href="mailto:../@Website"&gt;&lt;FONT color=#ff0000&gt;../@Website&lt;/FONT&gt;&lt;/A&gt;&lt;FONT color=#ff0000&gt; = $web) or $web ='') and not(.=../preceding-sibling::*/@Title)]"&amp;gt;&lt;/FONT&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;option&amp;gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:attribute name="value"&amp;gt;&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;&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;lt;xsl:value-of select="."/&amp;gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xsl:attribute&amp;gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:if test="$val=."&amp;gt;&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;&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;lt;xsl:attribute name="selected"&amp;gt;selected&amp;lt;/xsl:attribute&amp;gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xsl:if&amp;gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:value-of select="."/&amp;gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/option&amp;gt;&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;lt;/xsl:for-each&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xsl:when&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:otherwise&amp;gt;&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;lt;option&amp;gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:value-of select="my:Title"/&amp;gt;&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;lt;/option&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xsl:otherwise&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xsl:choose&amp;gt;&lt;BR&gt;&amp;lt;/select&amp;gt;&lt;/P&gt;
&lt;P&gt;The edits you'll need to make are in &lt;FONT color=#ff0000&gt;red&lt;/FONT&gt;&lt;FONT color=#000000&gt;. There are also two other places (for the other two dropdown listboxes) where you'll need to make similar changes. I will leave that as an excercise for the reader. Here's an &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/xmrefXSLTReference.asp"&gt;XSLT reference&lt;/A&gt;, for those of you who actually made it this far :)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;More bad news... The InfoPath Designer has a tendency to overwrite any changes you make to the xsl. The way to keep your hand-edited xsl from being overwritten is to use an &lt;A href="http://support.microsoft.com/default.aspx?kbid=827009&amp;amp;product=infopath2003"&gt;xd:preserve template&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;The good news is that once you've done all this, you have fully achieved your goal of having repeating, multiply-cascading dropdown listboxes with uniqe entries., and you didn't have to write a single line of code to get them (some might argue that XSLT is worse to deal with than code, but that's another matter!)&lt;/P&gt;
&lt;P&gt;This may be a lot easier using the Filters feature in InfoPath SP1, but I do recall that the SP1 Filters feature does not include showing only unique entries in a&amp;nbsp;dropdown listbox.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Don't feel like messing with all this, but you still want to see what it looks like? Shoot me an email, and I'll send you a copy of the form.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=200559" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/davfries/archive/tags/InfoPath/default.aspx">InfoPath</category></item><item><title>Office 2003 SP1 Released! (Including InfoPath)</title><link>http://blogs.msdn.com/davfries/archive/2004/07/27/198870.aspx</link><pubDate>Tue, 27 Jul 2004 19:07:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:198870</guid><dc:creator>davfries</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/davfries/comments/198870.aspx</comments><wfw:commentRss>http://blogs.msdn.com/davfries/commentrss.aspx?PostID=198870</wfw:commentRss><description>&lt;P&gt;Download it &lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyId=9C51D3A6-7CB1-4F61-837E-5F938254FC47&amp;amp;displaylang=en"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Instructions for SP1 Preview users &lt;A href="http://blogs.msdn.com/infopath/archive/2004/07/27/198855.aspx"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Random monkeys dancing &lt;A href="http://www.monkeydance.com/"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=198870" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/davfries/archive/tags/InfoPath/default.aspx">InfoPath</category></item><item><title>Fun with VBScript in InfoPath</title><link>http://blogs.msdn.com/davfries/archive/2004/07/24/195300.aspx</link><pubDate>Sun, 25 Jul 2004 01:47:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:195300</guid><dc:creator>davfries</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/davfries/comments/195300.aspx</comments><wfw:commentRss>http://blogs.msdn.com/davfries/commentrss.aspx?PostID=195300</wfw:commentRss><description>&lt;P&gt;Say you want&amp;nbsp;to pop-up a dialog to the user to get some information. You could use the XDocument.UI.ShowModalDialog method, but this is Level 3, meaning you can only call it from &lt;A href="http://blogs.msdn.com/davfries/archive/2004/07/08/178011.aspx"&gt;Fully Trusted&lt;/A&gt; forms. You could also use managed code business logic and create a WinForm to display to the user, but that requires InfoPath SP1 functionality, not to mention that that seems like a lot of work just to throw a dialog with a input box.&lt;/P&gt;
&lt;P&gt;VBScript to the rescue! VBScript has 2 methods which are quite useful in InfoPath, and are not available in JScript: &lt;A href="http://msdn.microsoft.com/library/en-us/script56/html/vsfctMsgBox.asp"&gt;MsgBox&lt;/A&gt;&amp;nbsp;and &lt;A href="http://msdn.microsoft.com/library/en-us/script56/html/vsfctInputBox.asp"&gt;InputBox&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;MsgBox&amp;nbsp;throws a dialog with different buttons (OK, Cancel, Yes, No). (Note, InfoPath SP1 has a method which has similar functionality.&amp;nbsp;XDocument.UI.Confirm)&lt;/P&gt;
&lt;P&gt;InputBox throws a dialog with a text box. You can then take the information that the user types into the text box, and use it in your InfoPath form.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;This example shows how to call the InputBox method, and as a bonus, adds the value as a new item in a secondary data source/data connection&amp;nbsp;(in this case, an XML file). You can have a dropdown lisbox control which gets its values from the secondary data source/data connection. This provides a cool way for the user to add a new item to the dropdown listbox.&lt;/P&gt;
&lt;P&gt;First of all, you'll need to set your scripting language to VBScript. You can set this from Tools-&amp;gt;Form Options-&amp;gt;Advanced Tab. Do this before you start writing any script, otherwise you won't be able to change it.&lt;/P&gt;
&lt;P&gt;Once you've set your scripting language to VBScript, now you're ready to start adding events. Add a button to your form, change the label and ID to GetName, and then click on the &amp;#8220;Microsoft Script Editor&amp;#8221; button (In SP1, this button is now labeled &amp;#8220;Edit Form Code&amp;#8220;)&lt;/P&gt;
&lt;P&gt;In the script editor, add the following code:&lt;/P&gt;
&lt;P dir=ltr style="BORDER-RIGHT: brown 5px groove; BORDER-TOP: brown 5px groove; MARGIN-LEFT: 25px; BORDER-LEFT: brown 5px groove; MARGIN-RIGHT: 0px; BORDER-BOTTOM: brown 5px groove"&gt;&lt;FONT face="Courier New" color=#000000&gt;&lt;FONT color=#0000ff&gt;Sub&lt;/FONT&gt; GetName_OnClick(eventObj)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;FONT color=#0000ff&gt;Dim&lt;/FONT&gt; name&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;FONT color=#0000ff&gt;Dim&lt;/FONT&gt; oAuxDOM&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;FONT color=#0000ff&gt;Dim&lt;/FONT&gt; oNewCustomer&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;name = InputBox("Enter customer name:")&lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;FONT color=#0000ff&gt;Set&lt;/FONT&gt; oAuxDOM = XDocument.GetDOM("customers")&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;FONT color=#008000&gt;' Create a new customer element&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;FONT color=#0000ff&gt;Set&lt;/FONT&gt; oNewCustomer = oAuxDOM.createNode(1, "customer", "")&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oNewCustomer.text = name&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oAuxDOM.selectSingleNode("//customers").appendChild(oNewCustomer)&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XDocument.View.ForceUpdate()&lt;BR&gt;&lt;FONT color=#0000ff&gt;End Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;You might have noticed in the script above that there is a secondary data source/data connection called &amp;#8220;customers&amp;#8220; which we haven't added to our form yet. We'll add that now. Create a new file in notepad and call it customers.xml:&lt;/P&gt;
&lt;P dir=ltr style="BORDER-RIGHT: brown 5px groove; BORDER-TOP: brown 5px groove; MARGIN-LEFT: 25px; BORDER-LEFT: brown 5px groove; MARGIN-RIGHT: 0px; BORDER-BOTTOM: brown 5px groove"&gt;&lt;FONT face="Courier New" color=#006400&gt;&amp;lt;?xml version="1.0" ?&amp;gt;&lt;BR&gt;&amp;lt;customers&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;customer&amp;gt;ABC Tile Co.&amp;lt;/customer&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;customer&amp;gt;ACME Brick&amp;lt;/customer&amp;gt;&lt;BR&gt;&amp;lt;/customers&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;FONT color=#000000&gt;Add this file to your form using the resource manager (Tools-&amp;gt;Resource Manager in InfoPath RTM, Tools-&amp;gt;Resource Files in SP1)&lt;/FONT&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;Then create a secondary data source using this resource xml file (Tools-&amp;gt;Secondary Data Sources in InfoPath RTM, Tools-&amp;gt;Data Connections in SP1)&lt;/P&gt;
&lt;P dir=ltr&gt;Finally, add a dropdown listbox control to your form. From the properties dialog for the dropdown lisbox, choose to &amp;#8220;Look up entries in a database, web service, or file&amp;#8221; (Again, in SP1, this text is different, but similar) Set the Data Source dropdown to be the &amp;#8220;Customers&amp;#8220; data source, and set the Entries to bind to the /customers/customer node. Leave value and display name as &amp;#8220;.&amp;#8220;&lt;/P&gt;
&lt;P dir=ltr&gt;That's it! Preview the form and give it a try. If all goes well, every time you type something in the VBScript InputBox, it gets added to the end of your dropdown listbox. Not bad for less than 10 lines of script. &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=195300" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/davfries/archive/tags/InfoPath/default.aspx">InfoPath</category></item><item><title>Debugging Fully Trusted InfoPath Forms with Managed Code Business Logic</title><link>http://blogs.msdn.com/davfries/archive/2004/07/13/182648.aspx</link><pubDate>Wed, 14 Jul 2004 01:23:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:182648</guid><dc:creator>davfries</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/davfries/comments/182648.aspx</comments><wfw:commentRss>http://blogs.msdn.com/davfries/commentrss.aspx?PostID=182648</wfw:commentRss><description>&lt;P&gt;That's a mouthful, isn't it?&lt;/P&gt;
&lt;P&gt;First of all, you know what I mean by &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_ip2003_tr/html/odc_INF_Lab_15.asp"&gt;managed code business logic in InfoPath&lt;/A&gt;, right?&lt;/P&gt;
&lt;P&gt;Also, you know what a Fully Trusted InfoPath Form is, right? If not, &lt;A href="http://blogs.msdn.com/davfries/archive/2004/07/08/178011.aspx"&gt;here's a refresher&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Let's say you're a form developer, and you've been tasked with developing&amp;nbsp;a form which requires&amp;nbsp;managed code business logic AND calls into&amp;nbsp;InfoPath Level 3 OM (like XDocument.UI.ShowModalDialog). &lt;/P&gt;
&lt;P&gt;So, you start Visual Studio.NET 2003, choose to create a new InfoPath Project (you did install the &lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyId=7E9EBC57-E115-4CAC-9986-A712E22879BB&amp;amp;displaylang=en"&gt;InfoPath 2003&amp;nbsp;Toolkit for Visual Studio.NET&lt;/A&gt;, right?)&amp;nbsp;, and choose Visual C# Project. Finish the wizard, and you've got yourself a managed code InfoPath form. To debug the form, all you need to do is hit&amp;nbsp;F5, and the debugger will launch.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, let's make the form Fully Trusted. You have&amp;nbsp;3 options:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Register the Form&amp;nbsp;(via a script/msi created by using RegForm Tool in the SDK) 
&lt;LI&gt;Register the Form (via&amp;nbsp;a handwritten script which calls Level 3 OM method Application.RegisterSolution) 
&lt;LI&gt;Sign the Form (you can create a test code signing certificate using the InfoPath Designer)&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;One other thing to note: When working with InfoPath VS Projects, the form is in &amp;#8220;extracted&amp;#8221; format, meaning all the xsd, xsl, xml, and other files are sitting in a folder, as opposed to all wrapped up in an .xsn file (which is the default way to deploy forms). When you are ready to deploy your form to your users, use the Publishing Wizard to generate an .xsn file for your form.&lt;/P&gt;
&lt;P&gt;Back to the matter of making the form Fully Trusted. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;RegForm: &lt;/STRONG&gt;Since you're working with extracted form files,&amp;nbsp;you won't be able to use the RegForm tool in the SDK.&amp;nbsp;If you MUST use RegForm, here are the steps:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Publish the form to generate an .xsn file 
&lt;LI&gt;Run RegForm on the .xsn file to generate a .js file to register the form 
&lt;LI&gt;Run the .js file to register the form. 
&lt;LI&gt;Start the form, then attach VS to the InfoPath process to debug.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;But wait, there's more... After you've made a change to your code, you'll need to unregister the form, delete js files, republish&amp;nbsp;the form,&amp;nbsp;etc. It all gets very messy.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Signing Forms: &lt;/STRONG&gt;You also won't be able to use the signing method to make your form fully trusted, for the same reason. You can't sign extracted form files. You'll have to publish the form, sign the published .xsn, and then attach VS to the process in order to debug. You'll need to do this step every time you make a change to your code. Again, this is less than ideal.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;RegisterSolution OM: &lt;/STRONG&gt;The only other method remaining is to register the form without using RegForm. You can simply write your own .js file which calls RegisterSolution(), and register the manifest.xsf in your project folder.&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;1. Open the manifest.xsf and remove the publishURL. (required to make the form Fully Trusted)&lt;BR&gt;2. Write a script file which calls into &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_ip2003_tr/html/odc_INF_Lab_16.asp"&gt;InfoPath External Automation&lt;/A&gt;&amp;nbsp;to call RegisterSolution on the manifest.xsf file.&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#808080&gt;'Sample courtesy of Jeff Webb&lt;BR&gt;&lt;A href="http://www.mcse.ms/archive180-2004-4-605806.html"&gt;'http://www.mcse.ms/archive180-2004-4-605806.html&lt;BR&gt;&lt;/A&gt;set ip = CreateObject("InfoPath.Application")&lt;BR&gt;Set fso = CreateObject("Scripting.FileSystemObject")&lt;BR&gt;pth = fso.GetFolder(".").path&lt;BR&gt;ip.registersolution pth &amp;amp; "\manifest.xsf"&lt;BR&gt;set ip = nothing&lt;BR&gt;set fso = nothing&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P dir=ltr&gt;3. Run the script file.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Now you should be able to simply hit F5 to debug your form, and it should be able to successfully call any InfoPath Level 3 OM Methods (XDocument.UI.ShowModalDialog, etc) without a security exception. Changes to your code are also automatically updated without having to republish. Sweetness.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;: When you're ready to deploy your form to your users, you should still publish your form, and utilize RegForm or code signing certificates to make your forms fully trusted. This posting is simply talking about how to debug your form without losing your mind.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=182648" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/davfries/archive/tags/InfoPath/default.aspx">InfoPath</category></item><item><title>InfoPath SP1 Security</title><link>http://blogs.msdn.com/davfries/archive/2004/07/08/178011.aspx</link><pubDate>Fri, 09 Jul 2004 05:25:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:178011</guid><dc:creator>davfries</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/davfries/comments/178011.aspx</comments><wfw:commentRss>http://blogs.msdn.com/davfries/commentrss.aspx?PostID=178011</wfw:commentRss><description>&lt;P&gt;Note: This post doesn't go over the SP-1 deployment model. If you want to learn about that, read this &lt;A href="http://blogs.msdn.com/infopath/archive/2004/04/01/105742.aspx"&gt;post&lt;/A&gt;&amp;nbsp;from the InfoPath Team blog.&lt;/P&gt;
&lt;P&gt;InfoPath has a rather unique security model. It borrows a bit from IE, a bit of its own, and with SP1, it adds a little bit of .NET security to the mix.&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;STRONG&gt;IE Security: &lt;/STRONG&gt;Internet Explorer security is based on the Zones concept. There are 5 zones (going from most restrictive to least restrictive) Restricted, Internet, Intranet, Trusted Sites, and the non-configurable Local Machine zone. If your webpage has script which tries to create an unsafe ActiveX control (like FileSystemObject), it will get an error on every zone except Local Machine, and Trusted Sites, where you will be prompted. Also, if your script tries to access a resource on another &amp;#8220;domain&amp;#8221; (a.k.a website), you will get access denied in the Internet Zone, prompted with that friendly &amp;#8220;This page is accessing information that is not under its control. This poses a security risk. Do you want to continue?&amp;#8221; dialog in the Intranet Zone, and your call will succeed on the Local Computer or a Trusted Site. If you had script in an InfoPath custom HTML task pane, it would naturally behave the same way. &lt;/P&gt;
&lt;P dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;STRONG&gt;InfoPath-specific Security&lt;/STRONG&gt;:InfoPath can run script in a custom HTML task pane, but it also can run script as built-in business logic to respond to events like OnLoad of the form, or OnClick of a button. InfoPath has its own Object Model, and each property or method has it's own security level:&lt;/P&gt;
&lt;UL dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;LI&gt;&lt;STRONG&gt;Level 0: &lt;/STRONG&gt;Level 0 properties/methods can be called by anyone, anywhere. They are very innocuous methods that are considered safe no matter who calls them. (Ex. Application.FormatString) 
&lt;LI&gt;&lt;STRONG&gt;Level 2: &lt;/STRONG&gt;To understand level 2 methods, you need to understand that InfoPath forms can communicate with each other. I can say Application.XDocuments.Item(1) from my business logic and get access to another form that's currently running on the machine. Whether or not this call will succeed or not is based on whether the Form Template (xsn) file is located on the local machine or Trusted Sites, the Intranet Zone, or the Internet Zone.(InfoPath forms don't run if the Form Template (xsn) file is located in the Restricted Zone). In addition, any paramaters in a method call are checked to make sure they are not accessing information in another Domain. The vast majority of the InfoPath OM is level 2 (Ex. XDocuments.Open, XDocument.UI.Alert, etc) 
&lt;LI&gt;&lt;STRONG&gt;Level 3: &lt;/STRONG&gt;These methods/properties are considered unsafe no matter who is calling them. The only way to prove that you are trustworthy enough to call them is if your form template is Fully Trusted. This means that you must register the form&amp;nbsp;call the ExternalApplication (or just Application in SP1) RegisterSolution method, or you can digitally sign the form (SP1 only). You can also use the RegForm tool in the &lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyId=351F0616-93AA-4FE8-9238-D702F1BFBAB4&amp;amp;displaylang=en"&gt;InfoPath SDK&lt;/A&gt;&amp;nbsp;to generate a .js or .msi file to register the form for you.&lt;/LI&gt;&lt;/UL&gt;
&lt;P dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;STRONG&gt;.NET Security:&lt;/STRONG&gt; With InfoPath SP1, you have the option of writing &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_ip2003_tr/html/odc_INF_Lab_15.asp"&gt;business logic in managed code&lt;/A&gt;. I won't get into all of the details of &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconcodeaccesssecurity.asp"&gt;Code Access Security&lt;/A&gt;, but let me say this. InfoPath Forms with managed code business logic, unlike regular .NET console applications, do not have FullTrust permissions on the local machine. It&amp;nbsp;is granted the&amp;nbsp;LocalIntranet Permission Set instead. This means you won't be able to willy-nilly create TextWriters and overwrite your friend's boot.ini file just by getting him to open an InfoPath form. It also means you won't be able to create TextWriters (and many other .NET Framework Objects) while you are developing your form. If you'd like to learn how to configure the InfoPath Form Templates group using the .NET Configuration 1.1 utilitiy, check out this&amp;nbsp;&lt;A href="http://www.oakleaf.ws/infopath/fulltrust.aspx"&gt;page from Roger Jennings&lt;/A&gt;&amp;nbsp;(Note: There's a security warning in there about how not to expose yourself to attack. &lt;FONT color=#ff0000&gt;&lt;STRONG&gt;READ IT!&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;)&lt;/FONT&gt;&lt;/P&gt;
&lt;P dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;STRONG&gt;Putting it all together:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P dir=ltr style="MARGIN-RIGHT: 0px"&gt;These are just a few interesting facts that &amp;#8220;naturally&amp;#8220; (or not so naturally)&amp;nbsp;fall out of the 3 security models&lt;/P&gt;
&lt;UL dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;UL&gt;
&lt;LI&gt;Granting your managed code business logic FullTrust Permissions will have no effect whatsoever on your script running in the custom task pane. 
&lt;LI&gt;Running a form with managed code business logic from a IE Trusted Site will cause the business logic to fail with a security exception. Why? .NET Security grants IE Trusted Sites the Internet Permission Set by default. InfoPath forms with managed code business logic won't even open in the Internet Zone. 
&lt;LI&gt;Granting Full Trust to managed code business logic does not entitle you to call InfoPath OM Level 3 methods.
&lt;LI&gt;Granting your InfoPath form Full Trust (by registering or signing it) does entitle your managed code business logic&amp;nbsp;to the FullTrust permission set. 
&lt;LI&gt;Communication between the taskpane and managed code business logic requires that your managed code has FullTrust permissions (because it needs to call into unmanaged code). If your form needs to communicate with the taskpane, try to stick with script for your business logic, if you can. 
&lt;LI&gt;Email-deployed forms will not be able to use managed code business logic. 
&lt;LI&gt;Do not taunt Happy Fun Ball&lt;FONT face=Arial size=4&gt;&amp;#8482;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;
&lt;P dir=ltr&gt;&amp;nbsp;&lt;/P&gt;&lt;FONT face="Courier New" size=2&gt;&lt;/FONT&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=178011" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/davfries/archive/tags/InfoPath/default.aspx">InfoPath</category></item><item><title>InfoPath 2003 SP1 and Active Directory</title><link>http://blogs.msdn.com/davfries/archive/2004/06/29/169043.aspx</link><pubDate>Tue, 29 Jun 2004 19:23:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:169043</guid><dc:creator>davfries</dc:creator><slash:comments>9</slash:comments><comments>http://blogs.msdn.com/davfries/comments/169043.aspx</comments><wfw:commentRss>http://blogs.msdn.com/davfries/commentrss.aspx?PostID=169043</wfw:commentRss><description>&lt;P&gt;I figured I'd be the only one in the developer division not blogging about &lt;A href="http://lab.msdn.microsoft.com/vs2005/"&gt;Beta 1&lt;/A&gt;!&lt;/P&gt;
&lt;P&gt;When I was on the InfoPath team, I wrote a hands on lab (&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_ip2003_tr/html/odc_INF_Lab_15.asp"&gt;Lab 15&lt;/A&gt;)which talked about using managed code with InfoPath. Excercise 3 of the lab talked about using managed code to access information in Active Directory using System.DirectoryServices. &lt;/P&gt;
&lt;P&gt;While this seemed like a great idea at the time, I've since realized that there's a better approach to the problem.There's really only one big problem, and that's that System.DirectoryServices requires FullTrust permissions in order to run. Since InfoPath forms by default do not have FullTrust permissions granted, you'll have to jump through all sorts of hoops in order to run the form (that's a blog for another time).&lt;/P&gt;
&lt;P&gt;A better approach is to have a machine with a Web Service on it which exposes the information from Active Directory that you need. This way, you don't need to make your form fully trusted, making it easier to deploy. In addition, other forms can hit your webservice, so you can reuse your code. Also, by using a web service, you don't even need InfoPath SP1! You can use data adapters to connect to the web service, and script to populate the fields you want populated.&lt;/P&gt;
&lt;P&gt;Here's the code for the web service, which is almost verbatim taken from the lab. &lt;/P&gt;
&lt;DIV style="BORDER-RIGHT: brown 5px groove; BORDER-TOP: brown 5px groove; MARGIN-LEFT: 25px; BORDER-LEFT: brown 5px groove; BORDER-BOTTOM: brown 5px groove"&gt;&lt;CODE&gt;&lt;FONT color=#0000ff&gt;using&lt;/FONT&gt; System;&lt;BR&gt;&lt;FONT color=#0000ff&gt;using&lt;/FONT&gt; System.Collections;&lt;BR&gt;&lt;FONT color=#0000ff&gt;using&lt;/FONT&gt; System.ComponentModel;&lt;BR&gt;&lt;FONT color=#0000ff&gt;using&lt;/FONT&gt; System.Data;&lt;BR&gt;&lt;FONT color=#0000ff&gt;using&lt;/FONT&gt; System.Diagnostics;&lt;BR&gt;&lt;FONT color=#0000ff&gt;using&lt;/FONT&gt; System.Web;&lt;BR&gt;&lt;FONT color=#0000ff&gt;using&lt;/FONT&gt; System.Web.Services;&lt;BR&gt;&lt;FONT color=#0000ff&gt;using&lt;/FONT&gt; System.DirectoryServices; 
&lt;P&gt;&lt;FONT color=#0000ff&gt;namespace&lt;/FONT&gt; WhoAmI&lt;BR&gt;{&lt;BR&gt;&lt;FONT color=#008000&gt;&amp;nbsp; /// &amp;lt;summary&amp;gt;&lt;BR&gt;&amp;nbsp; /// Summary description for Service1.&lt;BR&gt;&amp;nbsp; /// &amp;lt;/summary&amp;gt;&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp; [WebService(Namespace="&lt;A href="http://davfries.foobar/whoami/"&gt;http://davfries.foobar/whoami/&lt;/A&gt;")]&lt;BR&gt;&amp;nbsp; &lt;FONT color=#0000ff&gt;public class&lt;/FONT&gt; Service1 : System.Web.Services.WebService&lt;BR&gt;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;public&lt;/FONT&gt; Service1()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&lt;FONT color=#008000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;//CODEGEN: This call is required by the ASP.NET Web Services Designer&lt;BR&gt;&lt;/FONT&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;InitializeComponent();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; [WebMethod]&lt;BR&gt;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;public string&lt;/FONT&gt; GetName()&lt;BR&gt;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;FONT color=#0000ff&gt;return&lt;/FONT&gt; System.Environment.UserName;&lt;BR&gt;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp; [WebMethod]&lt;BR&gt;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;public string&lt;/FONT&gt; GetDomain()&lt;BR&gt;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;return&lt;/FONT&gt; System.Environment.UserDomainName;&lt;BR&gt;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; [WebMethod]&lt;BR&gt;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;public string&lt;/FONT&gt; GetManager()&lt;BR&gt;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&lt;FONT color=#008000&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;// get current user name&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;FONT color=#0000ff&gt;string&lt;/FONT&gt; strUserName = System.Environment.UserName;&lt;BR&gt;&lt;FONT color=#008000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// search for user whose mailNickname is the logon name&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DirectorySearcher ds = new DirectorySearcher("(mailNickname="&amp;nbsp;+ strUserName + ")");&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;SearchResult result = ds.FindOne();&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;FONT color=#0000ff&gt;if&lt;/FONT&gt;(result == &lt;FONT color=#0000ff&gt;null&lt;/FONT&gt;)&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;FONT color=#0000ff&gt;return&lt;/FONT&gt; "Error finding user " +&amp;nbsp;strUserName + " using Active Directory.";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;DirectoryEntry employeeEntry = result.GetDirectoryEntry();&lt;BR&gt;&lt;FONT color=#008000&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;// find manager's LDAP DN from the DirectoryEntry&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;FONT color=#0000ff&gt;string&lt;/FONT&gt; strManagerDN =&amp;nbsp;employeeEntry.Properties["manager"].Value.ToString();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;FONT color=#008000&gt;// use the DN to create a new DirectoryEntry&lt;/FONT&gt;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;DirectoryEntry managerEntry = &lt;FONT color=#0000ff&gt;new&lt;/FONT&gt; DirectoryEntry("LDAP://" + strManagerDN);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;FONT color=#008000&gt;&lt;FONT color=#008000&gt;// get the alias of the manager&lt;/FONT&gt;&lt;BR&gt;&lt;/FONT&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;FONT color=#0000ff&gt;string&lt;/FONT&gt; strManagerAlias =&amp;nbsp;managerEntry.Properties["mailNickname"].Value.ToString();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;FONT color=#0000ff&gt;return&lt;/FONT&gt; strManagerAlias;&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;} &lt;/CODE&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;Then, in InfoPath business logic, you would have (something like) the following code:&lt;/P&gt;
&lt;DIV style="BORDER-RIGHT: brown 5px groove; BORDER-TOP: brown 5px groove; MARGIN-LEFT: 25px; BORDER-LEFT: brown 5px groove; BORDER-BOTTOM: brown 5px groove"&gt;&lt;CODE&gt;
&lt;P&gt;IXMLDOMNode nodeManager = &lt;BR&gt;thisXDocument.DOM.selectSingleNode("my:SalesReport/my:manager");&lt;BR&gt;nodeManager.text = XDocument.GetDOM("GetManager").selectNodes("/dfs:myFields/dfs:dataFields/d:GetManagerResponse/d:GetManagerResult").text;&lt;/P&gt;&lt;/CODE&gt;&lt;/DIV&gt;I hope this is helpful...&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=169043" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/davfries/archive/tags/InfoPath/default.aspx">InfoPath</category></item></channel></rss>