CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Using Autocomplete in search form

Print topic Send  topic

Author Message
incoronado

Posts: 12
Posted: 09/10/2015, 10:15 AM

I would like to create a textbox in a search form that performs a query that displays "Lastname, Firstname" but links to a where statement that uses user_id instead of LastName because it is not unique.


My service query is

SELECT Users.LastName, Users.FirstName, Users.User_ID, concat(Users.LastName,", ",Users.FirstName) AS fullname
FROM Users
WHERE Users.User_ID LIKE '{term}%'

I have a jquery template that uses Placeholder=@label and Source Name={fullname}


I cannot figure out how to do this and I can't find an example that leads me to a solution. This is very easy to do using a list box.


View profile  Send private message
fmanrique

Posts: 2
Posted: 09/20/2015, 12:03 PM

I used in the service page (the page Ajax uses) in the query a SQL Query Type.
And I put something like that:

SELECT Users.LastName, Users.FirstName, Users.User_ID, concat(Users.LastName,", ",Users.FirstName) AS fullname
FROM Users
WHERE concat(Users.LastName,", ",Users.FirstName) LIKE '{term}%'

The user can put Smi%Wil and the ajax will show:
Smith, Will
Smith, Wilson
Smith, Wiliam

_________________
Codecharge Developer
BssLtda.com
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.