DropDowns & Current(). . . again - InfoPath Dev
in

InfoPath Dev

DropDowns & Current(). . . again

Last post 01-18-2006 10:22 AM by Anonymous. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 01-18-2006 10:22 AM

    DropDowns & Current(). . . again

    Hi:

    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:
    Main Connection
    Group -- SystemConfigs
    Field -- ID
    Field -- SorterFamily
    Group -- LightingSystems
    Field -- ID
    Field -- LightingSystems
    Field -- SystemID

    SystemID in the LightingSystems group relates to ID in the SystemConfigs group.
    Secondary Connection (used for dropdown)
    Group -- LightingSystems
    Field -- ID
    Field -- LightingSystems
    Field -- SystemID
    Group -- SystemConfigs
    Field -- ID
    Field -- SorterFamily
    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.

    If I filter using the following XPath, I get only values associated with the correct SorterFamily:
    The expression ../d:SystemConfigs/@SorterFamily = current()/../@SorterFamily
    If I use this next XPath, I get only unique values:
    The expression not(. = preceding::d:LightingSystems[/descendant-or-self::node()/@SorterFamily = current()/../@SorterFamily]/@LightingSystems)
    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.

    Any ideas why each of these filters works correctly on its own but not in combination?

    Thanks--Hilary
Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.