This content has been marked as final. Show 3 replies
I don't understand the actual results desired. But I would make my cffunction returntype a string and get rid of the cfloop that creates your array. One of my autosuggest cfcs is;
<cffunction name="getJobsearch" access="remote" returnType="string" output="false">
<cfargument name="term" type="string" required="false">
<cfset var Jqry = "">
<cfquery name="Jqry" datasource="taxsearchdb">
SELECT J.CompanyName + ' ' + J.CompanyCity + ' ' + C.State + ' ^' + cast(J.JobOrderNumber as varchar) as Jname
FROM jorder J, Companies C
WHERE J.CompanyNumber = C.CompanyRecordNumber and J.CompanyName LIKE <cfqueryparam cfsqltype="cf_sql_var" value="#trim(arguments.term)#%">
Just a note;
I return a list of fields that has company name and city and state and job number concatenated. The caret ^ is used later to find the job number in the field Jname.
Thank you, changing it to a string worked great.