<?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>DropDowns &amp; Current(). . . again</title><link>https://www.infopathdev.com:443/forums/thread/5283.aspx</link><pubDate>Wed, 18 Jan 2006 18:22:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:5283</guid><dc:creator>Anonymous</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/5283.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=5283</wfw:commentRss><description>Hi:&lt;br /&gt;&lt;br /&gt;I have a form connected to a SQL datasource. It uses a master/detail control. I'm using a combination of textboxes and dropdown boxes in the detail section, with conditional formatting to mimic a combobox--if the field is blank, the dropdown shows. My dropdown is connected to a secondary datasource, which is a table in the same SQL database. Here is a simplified example of my data structure:&lt;br /&gt;Main Connection&lt;br /&gt;Group -- SystemConfigs&lt;br /&gt;  Field -- ID&lt;br /&gt;  Field -- SorterFamily&lt;br /&gt;  Group -- LightingSystems&lt;br /&gt;    Field -- ID&lt;br /&gt;    Field -- LightingSystems&lt;br /&gt;    Field -- SystemID&lt;br /&gt;&lt;br /&gt;SystemID in the LightingSystems group relates to ID in the SystemConfigs group.&lt;br /&gt;Secondary Connection (used for dropdown)&lt;br /&gt;Group -- LightingSystems&lt;br /&gt;  Field -- ID&lt;br /&gt;  Field -- LightingSystems&lt;br /&gt;  Field -- SystemID&lt;br /&gt;  Group -- SystemConfigs&lt;br /&gt;    Field -- ID&lt;br /&gt;    Field -- SorterFamily&lt;br /&gt;For my dropdown, I need the LightingSystems displayed to be unique values that are associated with the correct SorterFamily, which is why I added SystemConfigs as an additional table in my secondary data connection.&lt;br /&gt;&lt;br /&gt;If I filter using the following XPath, I get only values associated with the correct SorterFamily:&lt;br /&gt;The expression ../d:SystemConfigs/@SorterFamily = current()/../@SorterFamily&lt;br /&gt;If I use this next XPath, I get only unique values:&lt;br /&gt;The expression not(. = preceding::d:LightingSystems[/descendant-or-self::node()/@SorterFamily = current()/../@SorterFamily]/@LightingSystems)&lt;br /&gt;If I use both. . . I lose values that show in two different SorterFamily attributes. For example, if for SorterFamilyA I have HID, Laser and UV lighting systems, they will all show in my dropdown. But if for SorterFamilyB I also have a UV lighting system, it will not show.&lt;br /&gt;&lt;br /&gt;Any ideas why each of these filters works correctly on its own but not in combination?&lt;br /&gt;&lt;br /&gt;Thanks--Hilary</description></item></channel></rss>