Using textbox entry to set SQL data connected dropdown - InfoPath Dev
in

InfoPath Dev

Using textbox entry to set SQL data connected dropdown

Last post 08-14-2015 12:51 PM by RubyScye. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 08-14-2015 12:51 PM

    Using textbox entry to set SQL data connected dropdown

     Hi all,

    I have a form (InfoPath 2013) that connects to a SQL view with just 2 columns -  ItemNum and ItemDesc.  I have created the connection in InfoPath and it pulls the data fine (tested with a repeating table to  be sure it's getting all the data).

    The backward requirement I have for this form is that there is a textbox (ItemNumberEntered) on the form where the user will type in the Item Number data themselves. 

    When they type in an item number, I need for another field called ItemDescriptionPulled to populate with the ItemDesc *if* it exists...otherwise it stays blank.

    So I have my ItemNumberEntered textbox and my ItemDescriptionPulled rich text field and my SQL view connection.  I have tried to set ItemDescriptionPulled's default value to the ItemDesc where ItemNum =  ItemNumberEntered and it stays blank (even when I KNOW the entered number is correct and there is a description).

    I have tried to run a rule that when ItemNumberEntered is changed the ItemDescriptionPulled is set to ItemDesc where ItemNum =  ItemNumberEntered.  It stays empty.

    Then I bound the ItemNum from SQL to a dropdown (SQLddHolder), and set it's default value to be = ItemNumberEntered.  This did indeed seem to work and when the textbox ItemNumberEntered changed it changed the dropdown.

    I then tried with rules and setting default value on ItemDescriptionPulled to be equal to ItemDesc where ItemNum = SQLddHolder.  Nothing - it would stay blank.  But if I manually changed the SQLddHolder to some other ItemNum then the ItemDescriptionPulled box would populate with data.

    When I did that, I noticed that the text entered by the user would end up in the dropdown list....even if it was already there.  So if a user typed in 111-111-001, the dropdown would look like it populated correctly, but if you expand the dropdown there are now 2 entries of that number.  The first one leaves the ItemDescriptionPulled blank, but change it to the other one and the data populates like it should.
    I've done Google searches and this apparently should not be such a difficult and time consuming setup.  I even found this thread - http://www.infopathdev.com/forums/p/28187/97316.aspx but nothing I've tried is working rules or otherwise.

    I hope I explained it clearly enough....Is there something I'm missing to get this to work?  It seems like it should be a quick and easy thing.

     Thanks for any help/suggestions,
    Ruby 


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