display name / value - InfoPath Dev
in

InfoPath Dev

display name / value

Last post 01-27-2009 11:38 AM by riehmc. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 10-14-2005 01:39 PM

    display name / value

    Is there a way to programmatically (or any other way) to get at the "Display Name" of items in a drop-down? I need the values and display names different in one situation, but when I bind the same node to a textbox control it displays the value. I need to display the "Display Name" in both the drop-down box and the textbox while having a different "value" for each item in the drop-down box, but that info can be discarded when displaying in the textbox.

    ---------------
    Matt Faus
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 10-17-2005 11:55 AM In reply to

    You can get them by knowing where your drop-down list box is getting its display values. You can, for example, use a rule when the drop-down list changes to go to the source and filter by the selected value to get the selected display name and save that into the text box field.

    Greg Collins [InfoPath MVP]
    InfoPath Dev
  • 10-18-2005 09:59 AM In reply to

    Hi,

    Have you checked (INFOPATHFAQ010129):
    http://www.infopathfaq.com/development.asp?page=2

    Regards,

    Franck Dauché
  • 10-18-2005 11:14 AM In reply to

    Thanks for the advice. I wound up adding another column to my repeating table. The drop-down displayed the "Display Name" and held the "value" and the hidden textbox field simply held the "Display Name".

    ---------------
    Matt Faus
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 10-21-2005 01:07 PM In reply to

    That works too! Glad to hear you got it working.

    Greg Collins [InfoPath MVP]
    InfoPath Dev
  • 01-26-2009 02:10 PM In reply to

    What if your not using a data source and want the display name to appear instead of the value on the 2nd view?

  • 01-27-2009 07:28 AM In reply to

    Nevermind, I see how retarded it would be not to use a datasource.  Is there a way to make one of the entries a default value so the drop-down keeps its "Select..." label on it?

  • 01-27-2009 08:06 AM In reply to

    Sure -- right click the field that is bound to the drop down list and set the default value on that field to use your secondary data source that holds the drop down list info, filtered to select the correct entry for your 'Select ....' value....

    Hilary Stoupa

  • 01-27-2009 11:38 AM In reply to

    I figured it out.  I have recently changed the drop-list to a textbox on the 2nd screen and this created a default value of 0 that muxed it all up.  Once I deleted and recreated the original drop-lists boxes it worked like a charm. 

    The only thing that still kind of bothers me is the empty space that is in the drop-list options.  I'm worried that someone could select the empty space and it screw up some programming.

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