Display name from DDL - InfoPath Dev
in

InfoPath Dev

Display name from DDL

Last post 04-17-2006 07:08 PM by Matt Faus. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 04-11-2006 02:19 PM

    • newbE
    • Not Ranked
    • Joined on 04-06-2006
    • Posts 6

    Display name from DDL

    I've created a repeating table with a DDL in it. The DDL is populated with alot of things.

    Elsewhere in my form I have a DDL that will look up values in the forms data source,(the repeating table DDL). This works almost exactly how I want it by showing only the things that were added in the repeating table rather than the huge list of things. The problem is it shows the values and not the display name.

    Is there a way to get the display name to show in the drop down, while keeping its value?

    Here is a test3.xsn of what I am trying to do if this isn't making sense. Thanks!
    http://www.solarlogic.net/test3.xsn

  • 04-12-2006 08:00 AM In reply to

    Hi newbE,

    This is a great question and after looking at your form file, you are on the right track, but it is going to be a little more tricky than what you had thought.

    First, you need to move your drop-down options to a secondary data source, and populate both drop-downs from this list.

    However, on the second, filtered drop-down, you need to use a data filter whenever you are setting the entries in the properties dialog box. The filter would be something like:

    New2DSValueField = MainDOMRepeatingValueField

    In general, it is much easier to work with drop-downs if their options are stored in a secondary DOM. If you need a more detailed instruction set for this process, there should be a HowTo coming out at the end of the week that might give you some insight.
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 04-13-2006 11:14 AM In reply to

    • newbE
    • Not Ranked
    • Joined on 04-06-2006
    • Posts 6
    thanks for the info. Do you have any suggestions for creating the secondary data sources? And I also want to clarify.. In the second drop down list that is being populated from the drop down list in the repeating table, it is important that it retains both the value and display name. I need the value to filter specific data and populate other fields in my form, but I also need the display name to show because that is what the end user will see and need to understand.

    Thanks again for all your help.
  • 04-17-2006 04:15 PM In reply to

    • newbE
    • Not Ranked
    • Joined on 04-06-2006
    • Posts 6
    ahh great, I did get this to work using secondary data sources. To get the secondary data source I created a form with a repeating table with two columns, one for displayname, and one for value(thanks Matt Faus for this info in another post). Then opened the form and filled it out with all the data I needed, then saved it as an XML.

    The filter option worked great, but only if I did
    MainDOMRepeatingValueField = New2DSValueField

    rather than
    New2DSValueField = MainDOMRepeatingValueField

    The only thing that I don't like is that if the value is the same for two different DisplayNames, when selected in the form they won't stay on the Displayname that was selected. To get around this I've been giving each displayname a unique value and creating an extra column with a hidden textbox, then using filters to populate the value of the textbox to whatever I want based on the unique value of the original drop down list. Is there any other way of getting around this so I don't have to do so much extra work?

    Thanks for all your help Matt!


  • 04-17-2006 07:08 PM In reply to

    If you have a Many-to-one relationship from Display Names to Values I'm afraid you are going to have to do tricky things to get the correct display value.

    As a general rule of thumb the names/values should be unique.
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.