Database Driven Auto-Complete

Use this board for starting discussions, asking questions, and giving advice on Web programming for the IBM i platform (and predecessors.)
brianhd71
Profound User
Posts: 36
Joined: Thu Jan 02, 2014 6:20 pm
First Name: Brian
Last Name: Lannoye
Company Name: Dealertrack Technologies
Phone: 801.617.1806
State / Province: Utah
Zip / Postal Code: 84095
Country: United States
Contact:

Database Driven Auto-Complete

Post by brianhd71 »

Is there a way to search on one value on auto-complete and bring another value back to the text-box? I want the user to be able to search on a description and retrieve the code, but it does not look like that is possible. I have WACODE in the choice values field thinking it should retrieve that code, but it does not.
Capture.PNG
Capture.PNG (9.41 KiB) Viewed 2801 times
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Database Driven Auto-Complete

Post by Scott Klement »

The way you've set this up, it should display the WADESC, WACODE values on the screen, but store the WACODE value of the chosen item into whatever is bound to the 'value' property of the widget.

Is that what you're looking for?
brianhd71
Profound User
Posts: 36
Joined: Thu Jan 02, 2014 6:20 pm
First Name: Brian
Last Name: Lannoye
Company Name: Dealertrack Technologies
Phone: 801.617.1806
State / Province: Utah
Zip / Postal Code: 84095
Country: United States
Contact:

Re: Database Driven Auto-Complete

Post by brianhd71 »

Yes. That is exactly what I am looking for.
brianhd71
Profound User
Posts: 36
Joined: Thu Jan 02, 2014 6:20 pm
First Name: Brian
Last Name: Lannoye
Company Name: Dealertrack Technologies
Phone: 801.617.1806
State / Province: Utah
Zip / Postal Code: 84095
Country: United States
Contact:

Re: Database Driven Auto-Complete

Post by brianhd71 »

How do I get the code to display instead of the description?
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Database Driven Auto-Complete

Post by Scott Klement »

You can make it display both the code and the description, but you can't make it display just the code. The users typing needs to match what it is typing in the box... that's what autocomplete is all about.
brianhd71
Profound User
Posts: 36
Joined: Thu Jan 02, 2014 6:20 pm
First Name: Brian
Last Name: Lannoye
Company Name: Dealertrack Technologies
Phone: 801.617.1806
State / Province: Utah
Zip / Postal Code: 84095
Country: United States
Contact:

Re: Database Driven Auto-Complete

Post by brianhd71 »

I used a combo box to get the result I wanted.

Thanks..
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest