ComboBox Lookup from SQL DB - InfoPath Dev
in

InfoPath Dev

ComboBox Lookup from SQL DB

Last post 06-11-2009 08:21 AM by Jimmy. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 06-11-2009 05:31 AM

    ComboBox Lookup from SQL DB

    Normal 0 false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;}

     Dear all,

    I would kindly appreciate any advice anyone has to offer.

    I'm currently creating a form with a repeating section, within the section there is combobox and a textbox.

    The comboxbox is set to list items from the database, with its ID as the display value and description as the selected value. The textbox is bound to combobox, so when the ID is selected the description is loaded into the textbox. - This works really well. 

    The form is then saved.

    The problem occurs when the description is updated within the database, when the form is re-opened it does not update the information unless I re-select it from the combobox. Is there a way to automate this?

    Oh and just to add, we are not submitting data back, simply showing it within the form.

     I'm using IP 2003.

    Thanks.

  • 06-11-2009 08:21 AM In reply to

    Re: ComboBox Lookup from SQL DB

    dannyduke:
    The comboxbox is set to list items from the database, with its ID as the display value and description as the selected value. The textbox is bound to combobox, so when the ID is selected the description is loaded into the textbox. - This works really well. 

    This doesn't sound right to me.  Typically you would want to have the ID as the value in the field bound to the dropdown, because it is unique.  This is especially the case if the description is going to be changing in the database!

    I'd say that's the source of your problem.  I would suggest using the ID as the selected value for the dropdown (and the display value if that's the way you want it) and then use an expression box or textbox with an XPath formula to show the description on the form.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.