HelpSpot Help Desk Software | HelpSpot Blog | HelpSpot Support

How to limit query to accept just entered values from Live Lookup?


I have a query that pulls all customers from the table. I have more than 10k records. I want to limit my query to output just entered values from the table. My current code pulls out all records. Can anyone help me with that. Thanks in advance.

Here is my code:

<?xml version="1.0" encoding="utf-8"?><cfsilent>
<cfquery name="myQuery" datasource="Customers">
    SELECT  CustomerId,FirstName,LastName
    FROM    Customer
<!--- These are standard elements which can be inserted back into a request --->
<livelookup version="1.0" columns="first_name,last_name"><cfoutput query="myQuery">


This could be why it doesn’t work at all (in your other thread). Perhaps all 10K can’t be pulled out in time. You may want to try limiting the number of results for now to see if that gets things working in general.

I’m not sure this is the right place to get Coldfusion help though. Live Lookup just passes in the data via GET or POST whichever you’ve selected.


I fixed this problem and works fine now but just for the records that I limit in my query. How I can pass the values from Live Lookup to limit my query ex. FirstName, LastName , Customer Id. If I enter any of these values I want to get customers that match entered values?


Great! For that you’ll need to get the values from GET or POST (whichever you’ve selected) in Coldfusion and pass them to your query. You’d need to check the Coldfusion docs for that.