<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Cascading Dropdown Boxes, Repeating</title><link>https://www.infopathdev.com:443/forums/thread/19436.aspx</link><pubDate>Tue, 01 May 2007 01:44:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:19436</guid><dc:creator>kaleo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/19436.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=19436</wfw:commentRss><description>&lt;p&gt;Hello Richard,&lt;/p&gt;&lt;p&gt;You&amp;#39;re in luck! becuase&amp;nbsp;I wrote a &amp;quot;Contact Sheet&amp;quot; in InfoPath 2003 when I First Encountered this issue.&lt;/p&gt;&lt;p&gt;Unfourtunately, I haven&amp;#39;t a clue how to write Jscript but I wrote it in Visual Basic Script which would be applicable with InfoPath 2003.&lt;/p&gt;&lt;p&gt;When the contact is selected, with the &amp;quot;Full Name&amp;quot; Pull Down it then Populates that users Email address and Phone Number.&lt;/p&gt;&lt;p&gt;Regardless of which row I changed it should always update the corresponding row (of course)&lt;/p&gt;&lt;ul&gt;&lt;li&gt;First, Set your &amp;quot;Form Options&amp;quot; to use &amp;#39;VB Script&amp;quot;&lt;/li&gt;&lt;li&gt;Then create the Repeating Table Below: &lt;/li&gt;&lt;ul&gt;&lt;li&gt;Respectively: Field1, Field2, Field3&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;p&gt;&lt;img alt="Project Contact Sheet" height="104" src="http://www.keomaka.us/images/contactsheet.gif" style="width:957px;height:104px;" title="Project Contact Sheet" width="957" /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Then added a Data Connection that queries the contact information I need.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The Data Connection could be SQL or Sharepoint or whatever, but remember what you named the datasource. (mine was Called &amp;quot;Contacts&amp;quot; and it Queried a Sharepoint List.)&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Then add a &amp;quot;On After Change Event&amp;quot;, by selecting the pull down and right-click - select it from the &amp;quot;Programming&amp;quot; menu&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;It should add the Following Sub to your project&lt;/p&gt;&lt;p&gt;&lt;strong&gt;BOLD:&lt;/strong&gt; new Code to Write&lt;/p&gt;&lt;p&gt;&lt;em&gt;Italic:&lt;/em&gt; my Comments&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;Sub msoxd_my_field1_OnAfterChange(eventObj)&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Dim MyDataConnection&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Set MyDataConnection = XDocument.DataObjects(&amp;quot;Contacts&amp;quot;).DOM&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;#39;This sets the reference to your Data Connection we made where &amp;quot;Contacts&amp;quot; is the name of your Data Connection&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;MyDataConnection.setProperty &amp;quot;SelectionNamespaces&amp;quot;, &amp;quot;xmlns:dfs=&amp;quot;&amp;quot;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution&amp;quot;&amp;quot; &amp;quot; &amp;amp; _ &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&amp;quot;xmlns:dsf=&amp;quot;&amp;quot;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution&amp;quot;&amp;quot; &amp;quot;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;#39;This enables us to call the additional nodes within our Data Connection&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Dim CurrentContact&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;CurrentContact = eventObj.Site.selectSingleNode(&amp;quot;../my:field1&amp;quot;).text&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;#39;This is where we set the relative Xpath to the Current Row (if the Xpath was &amp;quot;my:fields/my:group1/my:field1&amp;quot; then it would always return the first row in the table)&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Dim DataNode&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;DataNode = MyDataConnection.selectSingleNode(&amp;quot;/dfs:myFields/dfs:dataFields/dsf:Contacts[@Full_Name=&amp;#39;&amp;quot; &amp;amp; CurrentContact &amp;amp; &amp;quot;&amp;#39;]&amp;quot;)&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;#39;This Queries the Record in the DataConnection where Full_Name = Field1 (CurrentContact)&lt;/em&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;If (CurrentContact &amp;lt;&amp;gt; &amp;quot;&amp;quot;) Then &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;#39;This is just in case the Field is Blank on &amp;quot;update&amp;quot; it won&amp;#39;t return an error&lt;/em&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;If TypeName(DataNode.attributes.getNamedItem(&amp;quot;E-mail_Address&amp;quot;)) &amp;lt;&amp;gt; &amp;quot;Nothing&amp;quot; Then &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;#39;This is just in case the user doesn&amp;#39;t have an email address the form won&amp;#39;t return an error&lt;/em&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;eventObj.Site.selectSingleNode(&amp;quot;../my:field2&amp;quot;).text = DataNode.attributes.getNamedItem(&amp;quot;E-mail_Address&amp;quot;).text &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;#39;Thes sets Field2 (email address) to the address in the DataNode Query we created&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;strong&gt;End If &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;If TypeName(DataNode.attributes.getNamedItem(&amp;quot;Business_Phone&amp;quot;)) &amp;lt;&amp;gt; &amp;quot;Nothing&amp;quot; Then &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;#39;This is just in case the user doesn&amp;#39;t have a phone number the form won&amp;#39;t return an error&lt;/em&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;eventObj.Site.selectSingleNode(&amp;quot;../my:field3&amp;quot;).text = DataNode.attributes.getNamedItem(&amp;quot;Business_Phone&amp;quot;).text &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&amp;#39;Thes sets Field3 (Phone Number) to the Phone Number in the DataNode Query we created&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;strong&gt;End If &lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;strong&gt;End If&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;If eventObj.IsUndoRedo Then &lt;/p&gt;&lt;blockquote&gt;&lt;blockquote&gt;&lt;p&gt;&amp;#39; An undo or redo operation has occurred and the DOM is read-only. &lt;/p&gt;&lt;p&gt;Exit Sub &lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;End If &lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&amp;nbsp;&amp;#39;A field change has occurred and the DOM is writable. Write code here to respond to the changes. &lt;/p&gt;&lt;p&gt;End Sub&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&amp;nbsp;Hope this helps!&lt;/p&gt;&lt;p&gt;Kaleo&lt;/p&gt;</description></item><item><title>Re: Cascading Dropdown Boxes, Repeating</title><link>https://www.infopathdev.com:443/forums/thread/19399.aspx</link><pubDate>Fri, 27 Apr 2007 19:13:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:19399</guid><dc:creator>R.Allen</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/19399.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=19399</wfw:commentRss><description>&lt;p&gt;Hello Kaleo,&lt;/p&gt;&lt;p&gt;&amp;nbsp;I am not extremely familiar with coding but I&amp;#39;ll give it a shot, would you be able to provide the JScript version of this? I&amp;#39;m using InfoPath 2003 if that helps.&lt;/p&gt;&lt;p&gt;&amp;nbsp;Thanks for you help!&lt;/p&gt;&lt;p&gt;~Richard&lt;/p&gt;</description></item><item><title>Re: Cascading Dropdown Boxes, Repeating</title><link>https://www.infopathdev.com:443/forums/thread/19385.aspx</link><pubDate>Fri, 27 Apr 2007 00:37:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:19385</guid><dc:creator>kaleo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/19385.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=19385</wfw:commentRss><description>&lt;p&gt;Hello Richard,&lt;/p&gt;&lt;p&gt;Try setting the XPATH to a relative position...&lt;/p&gt;&lt;p&gt;For Example instead of:&lt;/p&gt;&lt;p&gt;&amp;quot;/my:myFields/my:Field1&amp;quot; &lt;/p&gt;&lt;p&gt;Make it &lt;/p&gt;&lt;p&gt;&amp;quot;../my:Field1&amp;quot;&lt;/p&gt;&lt;p&gt;InfoPath 2007 Managed Code (VB):&lt;/p&gt;&lt;p&gt;Dim XPN As XPathNavigator = Me.MainDataSource.CreateNavigator()&lt;/p&gt;&lt;p&gt;Dim Field1Node As XPathNavigator = XPN.SelectSingleNode(&amp;quot;../my:Field1&amp;quot;, Me.NamespaceManager)&lt;/p&gt;&lt;p&gt;&amp;#39;Use the Field1Node.Value to populate the rest of the table.&lt;/p&gt;&lt;p&gt;Kaleo&lt;/p&gt;</description></item><item><title>Cascading Dropdown Boxes, Repeating</title><link>https://www.infopathdev.com:443/forums/thread/19384.aspx</link><pubDate>Thu, 26 Apr 2007 23:14:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:19384</guid><dc:creator>R.Allen</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/19384.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=19384</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;I have read through a ton of forums so far and have not found this yet. If it&amp;#39;s been discussed and I missed it then I apologize...&lt;/p&gt;&lt;p&gt;&amp;nbsp;Situation:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; There are 4 tables involved in this form. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Table1 (Main Connection)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Table2 (&lt;span style="font-size:10pt;font-family:Arial;"&gt;Secondary &lt;/span&gt;Connection, Stores Look-up items for DBox2 Directly related to Table4)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Table3 (&lt;span style="font-size:10pt;font-family:Arial;"&gt;Secondary &lt;/span&gt;Connection, Stores Look-up items for DBox3, Directly related to Table4)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Table4 (&lt;span style="font-size:10pt;font-family:Arial;"&gt;Secondary &lt;/span&gt;Connection, Stores values selected from DBox2&amp;amp;3, Directly related to Table1)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have DBox2 that looks at Table2 and stores to Table4,&amp;nbsp;Then DBox3 that looks at Table3 and also stores to Talbe4. DBox3 is filtered by DBox2. This works perfectly.&lt;/p&gt;&lt;p&gt;&lt;img align="left" alt="DBox Example" height="51" src="http://www.geocities.com/radclimber1/dboxpic.bmp" style="width:671px;height:51px;" title="DBox Example" width="671" /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Problem I&amp;#39;m having:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I want them to be able to select an option in DBox2, then DBox3, then be able to insert a row and do the same. When I insert a row into the repeating table(or section, tried both) the list changed but shows the contents in DBox3 related to both DBox2&amp;#39;s.&lt;/p&gt;&lt;p&gt;Question:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Is there a way to make it only look at the &amp;quot;row&amp;quot; that I am working on and not just the field name as even when you insert a row, it&amp;#39;s still the same field and all the one&amp;#39;s selected above are applied to that filter? &lt;/p&gt;&lt;p&gt;&amp;nbsp;Thank You!&lt;/p&gt;&lt;p&gt;&amp;nbsp;~Richard Allen&lt;/p&gt;</description></item></channel></rss>