<?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>Data Connections</title><link>https://www.infopathdev.com:443/forums/44.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Filtering repeating table with secondary datasourc</title><link>https://www.infopathdev.com:443/forums/thread/12382.aspx</link><pubDate>Wed, 28 Mar 2007 23:44:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12382</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12382.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=12382</wfw:commentRss><description>Then I'm confused -- because yo are mixing two different worlds in your first posting: Code-XPaths and View-XPaths&lt;br /&gt;&lt;br /&gt;If you are trying to do all this in the designer, then you should not be doing any selectSingleNode anything.&lt;br /&gt;&lt;br /&gt;If you are doing this all in code, then you cannot use xdXDocument -- it doesn't exist.&lt;br /&gt;&lt;br /&gt;What I provided was an all code solution (though you probably need to modify it a bit to fit your particular scenario).</description></item><item><title>Re: Filtering repeating table with secondary datasourc</title><link>https://www.infopathdev.com:443/forums/thread/12381.aspx</link><pubDate>Wed, 28 Mar 2007 21:26:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12381</guid><dc:creator>spudy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12381.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=12381</wfw:commentRss><description>Greg I am confused by your last reply.&lt;br /&gt;&lt;br /&gt;When a particular row of the table (populated from secondary ds) is&lt;br /&gt;selected by the user I want to identify the ID of that particular&lt;br /&gt;row of the table - hence why I am trying to use current() to capture&lt;br /&gt;the ID to populate fields within the main datasource of the form.&lt;br /&gt;&lt;br /&gt;Spudy</description></item><item><title>Re: Filtering repeating table with secondary datasourc</title><link>https://www.infopathdev.com:443/forums/thread/12380.aspx</link><pubDate>Wed, 28 Mar 2007 17:27:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12380</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12380.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=12380</wfw:commentRss><description>If you go to the data source task pane you can create an OnAfterChange event for the table row (i.e. the node that holds all the row fields), if that is more useful to you.&lt;br /&gt;&lt;br /&gt;xdXDocument is not a valid object in code.&lt;br /&gt;&lt;br /&gt;Your attempting to use current() in the XPath will not work because there is no real context for it. What are you expecting current() to point to?&lt;br /&gt;In code it is better to be more explicit... for example:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;var selected = XDocument.DOM.selectSingleNode("//my:Selected");&lt;br /&gt;if(selected != null)&lt;br /&gt;{&lt;br /&gt;    var id = selected.selectSingleNode("ID");&lt;br /&gt;    var code = XDocument.GetDOM("ds2").selectSingleNode("/Group1/Group2[ID = '" + id + "']/Code");&lt;br /&gt;&lt;br /&gt;    if(code != null)&lt;br /&gt;    {&lt;br /&gt;        selected.text = code.text&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;</description></item><item><title>Re: Filtering repeating table with secondary datasourc</title><link>https://www.infopathdev.com:443/forums/thread/12379.aspx</link><pubDate>Wed, 28 Mar 2007 07:12:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12379</guid><dc:creator>spudy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12379.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=12379</wfw:commentRss><description>When a row is selected from the repeating table there are other fields outside of the table I wish to be populated with data.&lt;br /&gt;The data is from secondary data source that isn't to be altered.&lt;br /&gt;&lt;br /&gt;The data validation has only 'onafterchange' available from the individual data fields within the table.&lt;br /&gt;Can I just change the code to contextchange?&lt;br /&gt;&lt;br /&gt;Even so I used the on afterchange event to test;&lt;br /&gt;&lt;br /&gt;XDocument.DOM.selectSingleNode("//my:Selected").text = xdXDocument:GetDOM("ds2")/Group1/Group2/Code[../ID = current()];&lt;br /&gt;&lt;br /&gt;From the error informing that template was not valid and &lt;br /&gt;"expected ;" there is evidently something fundamentally wrong with this.&lt;br /&gt;&lt;br /&gt;many thanks&lt;br /&gt;&lt;br /&gt;Spudy</description></item><item><title>Re: Filtering repeating table with secondary datasourc</title><link>https://www.infopathdev.com:443/forums/thread/12378.aspx</link><pubDate>Tue, 27 Mar 2007 16:49:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12378</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12378.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=12378</wfw:commentRss><description>Code might be your best choice here. OnContextChange works, but if it just needs to occur when a value changes, then use OnAfterChange instead.</description></item><item><title>Re: Filtering repeating table with secondary datasourc</title><link>https://www.infopathdev.com:443/forums/thread/12377.aspx</link><pubDate>Tue, 27 Mar 2007 06:38:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12377</guid><dc:creator>spudy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12377.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=12377</wfw:commentRss><description>I have only just got back to this project,hence my delay in responding.  &lt;br /&gt;&lt;br /&gt;This is a search function l am developing. A code is entered into the search  field which is then used as the filter for a repeating table bound to the secondary datasource.  For reasons I cannot recall now I couldn't get a master \detail relationship working here so I created separate fields outside of the table which I want to be automatically populated whenever the selection / focus within the repeating table changes.&lt;br /&gt;&lt;br /&gt;I suspect this needs to be code using the oncontextchange event?&lt;br /&gt;&lt;br /&gt; Thanks Spudy.</description></item><item><title>Re: Filtering repeating table with secondary datasourc</title><link>https://www.infopathdev.com:443/forums/thread/12376.aspx</link><pubDate>Mon, 12 Mar 2007 16:08:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12376</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12376.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=12376</wfw:commentRss><description>What kind of copying are you talking about?&lt;br /&gt;&lt;br /&gt;Will the user be clicking a button? If so, rules should work just fine.&lt;br /&gt;&lt;br /&gt;Are you using code? If so, you just need to get the DOM of the secondary data source and then do the selectSingleNode() as you normally would.</description></item><item><title>Re: Filtering repeating table with secondary datasourc</title><link>https://www.infopathdev.com:443/forums/thread/12375.aspx</link><pubDate>Sat, 10 Mar 2007 20:02:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12375</guid><dc:creator>spudy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12375.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=12375</wfw:commentRss><description>I have another hurdle. Now I have got the filter working I am looking to have data copied from the selected row. I know how to do this for repeating tables bound to the forms datasource but this cannot be applied to secondary datasource.&lt;br /&gt;&lt;br /&gt;Any ideas?&lt;br /&gt;&lt;br /&gt;Thanks</description></item><item><title>Re: Filtering repeating table with secondary datasourc</title><link>https://www.infopathdev.com:443/forums/thread/12374.aspx</link><pubDate>Fri, 09 Mar 2007 17:52:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12374</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12374.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=12374</wfw:commentRss><description>I'm glad you were able to get it working! and glad that I could help!</description></item><item><title>Re: Filtering repeating table with secondary datasourc</title><link>https://www.infopathdev.com:443/forums/thread/12373.aspx</link><pubDate>Fri, 09 Mar 2007 13:55:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12373</guid><dc:creator>spudy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12373.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=12373</wfw:commentRss><description>I have found the problem.&lt;br /&gt;&lt;br /&gt;The last square bracket on the line I posted here should not have been present. I was cutting and pasting my different attempts to keep track of changes. At some stage Infopath adds further filter information and moves the square bracket to the end. My cutting and pasting meant I was placing an extra square bracket in the middle of the filter. The ] in red was what done it!&lt;br /&gt;&lt;br /&gt;Greg, thanks again for your help.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;xdXDocument:GetDOM(&amp;quot;Secondary Datasource&amp;quot;)/Group1/Group2[contains(Code, xdXDocument:get-DOM()/my:myFields/my:field1[. != &amp;quot;&amp;quot;]) and contains(sDescription, xdXDocument:get-DOM()/my:myFields/my:field2[. != &amp;quot;&amp;quot;])&lt;font color="red"&gt;] or&lt;/font id="red"&gt; ($filterParentHasNewRowsCTRL23 = &amp;quot;true&amp;quot; and xdXDocument:GetNamedNodeProperty(., &amp;quot;filterVersion&amp;quot;, &amp;quot;0&amp;quot;) &amp;gt; $filterParentVersionCTRL23)  ]&lt;/pre&gt;</description></item><item><title>Re: Filtering repeating table with secondary datasourc</title><link>https://www.infopathdev.com:443/forums/thread/12372.aspx</link><pubDate>Fri, 09 Mar 2007 10:43:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12372</guid><dc:creator>spudy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12372.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=12372</wfw:commentRss><description>Greg,&lt;br /&gt;&lt;br /&gt;I have tried various changes to get this filter to work. I tried your approach and have also replaced the quotes with &lt;pre&gt;&amp;quot;&lt;/pre&gt; but that failed without an error message. It keeps coming back to the "Required white space was missing" message.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;xsl:for-each select="xdXDocument:GetDOM(&amp;quot;Secondary Datasource&amp;quot;)/Group1/Group2[contains(Code, xdXDocument:get-DOM()/my:myFields/my:field1[. != ""]) and contains(sDescription, xdXDocument:get-DOM()/my:myFields/my:field2[. != ""])]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This really has me scratching my head. Is there any tool that anyone could recommend that can be used to validate such filters?&lt;br /&gt;&lt;br /&gt;Thanks</description></item><item><title>Re: Filtering repeating table with secondary datasourc</title><link>https://www.infopathdev.com:443/forums/thread/12371.aspx</link><pubDate>Fri, 09 Mar 2007 00:03:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12371</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12371.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=12371</wfw:commentRss><description>I don't see anything right off with your XPath, except for that if the XPath is contained in quotes, that you account for that by replacing double-quotes with single-quotes or using &amp;quot; instead.&lt;br /&gt;&lt;br /&gt;However, it might just be a logic flaw. Perhaps try the following instead:&lt;br /&gt;&lt;br /&gt;xdXDocument:GetDOM("Secondary Datasource")/Group1/Group2[xdXDocument:get-DOM()/my:myFields/my:field1 != "" and xdXDocument:get-DOM()/my:myFields/my:field2 != "" and contains(Code, xdXDocument:get-DOM()/my:myFields/my:field1) and contains(sDescription, xdXDocument:get-DOM()/my:myFields/my:field2)]&lt;br /&gt;&lt;br /&gt;What this does is first verify that the 2 fields are not blank and then if that is true for both, it continues with the contains() comparisons.</description></item><item><title>Re: Filtering repeating table with secondary datasourc</title><link>https://www.infopathdev.com:443/forums/thread/12370.aspx</link><pubDate>Thu, 08 Mar 2007 23:11:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12370</guid><dc:creator>spudy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12370.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=12370</wfw:commentRss><description>Many thanks for that Greg.&lt;br /&gt;&lt;br /&gt;I have a simple filter working and I am now trying a more complex&lt;br /&gt;filter but this is giving me an error message of:&lt;br /&gt;&lt;br /&gt;"Required white space was missing.". &lt;br /&gt;&lt;br /&gt;I have two textbox fields field1 and field2. I wish to filter using&lt;br /&gt;these if they are not blank against two fields of the secondary datasource.&lt;br /&gt;&lt;br /&gt;The filter I have is as follows:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;xdXDocument:GetDOM(&amp;quot;Secondary Datasource&amp;quot;)/Group1/Group2[contains(Code, xdXDocument:get-DOM()/my:myFields/my:field1[. != ""]) and contains(sDescription, xdXDocument:get-DOM()/my:myFields/my:field2[. != ""])]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Perhaps it really is a simple as a missing white space but I know not where!&lt;br /&gt;&lt;br /&gt;Many thanks again for your response.&lt;br /&gt;</description></item><item><title>Re: Filtering repeating table with secondary datasourc</title><link>https://www.infopathdev.com:443/forums/thread/12369.aspx</link><pubDate>Thu, 08 Mar 2007 17:44:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12369</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12369.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=12369</wfw:commentRss><description>You can use conditional formatting to accomplish the same thing, though they are not as efficient as filters.&lt;br /&gt;&lt;br /&gt;However, if you are familiar with XPath, you should be able to easily add a filter to your repeating table. Find the xsl:for-each row, and add your filter to the XPath...&lt;br /&gt;&lt;br /&gt;&amp;lt;xsl:for-each select="OriginalXPath[MyFilter]"&amp;gt;...&amp;lt;/xsl:for-each&amp;gt;</description></item><item><title>Filtering repeating table with secondary datasourc</title><link>https://www.infopathdev.com:443/forums/thread/12161.aspx</link><pubDate>Thu, 08 Mar 2007 17:21:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12161</guid><dc:creator>spudy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12161.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=12161</wfw:commentRss><description>It is evident that when a repeating table is bound to a secondary data-source if is not possible to use filters under the settings for the control. Can anyone give advice on how to do this in  the XSL view file?&lt;br /&gt;&lt;br /&gt; Many Thanks for any assistance.</description></item></channel></rss>