Populate a Textbox from a lookup

Comments

3 comments

  • Avatar
    AgilePoint NX Support

    Hi Paul,

    If you are populating the auto-lookup result to a combo box then the query you provided works and if you want to populate it to some other control other than combo box then you should not use the NAME/VALUE pair in query.

    You can use below query in your case to populate the value to the textbox:

    SELECT Code As TextBox81 FROM myTable WHERE BU='Brakes'

    Thanks

    0
    Comment actions Permalink
  • Avatar
    Paul Horvath

    Thank you! The auto-lookup works perfectly in my subform.

    I am now trying to do the same thing on the primary form using a Department dropdown (DeptDB) and a Department Description *(DeptDesc) textbox. The lookup tests properly and returns data.

    As I diagnose, I have hardcoded the WHERE='0015' to ensure I'm getting a result.

    When I change the value in the department dropdown, the autolookup is triggered and properly populates the department description with the result from the hardcoded query. so everything seems to work properly.

    When I change the query to use the new Department value ('DeptDB') I am not getting a populated Department Description. Is there a log I can look at to see what sql command is being executed when i'm in the dev/PC browser view?

     

     I have the autolookup trigger by a change in a specific value. But it d

     

     

    0
    Comment actions Permalink
  • Avatar
    Paul Horvath

    nevermind, I realized the VALUE portion of the Department dropdown was incorrect. All is good.

    0
    Comment actions Permalink

Please sign in to leave a comment.