Skip to main content
April 24, 2008
Question

CFinput and autosuggest difficulty

  • April 24, 2008
  • 1 reply
  • 598 views
Hello all,
The CFinput and Autosuggest seemed like they were going to work great. I was trying to use this format:
<cfinput type="text" name="OP12" autosuggest="#valuelist(get_drivers.DRIVER_NAME)#">
get_drivers is a CFquery in the same .cfm file, and DRIVER_NAME is a column the query returns. But the DRIVER_NAME is last name COMMA first name: ie Emery, Scott. The valuelist takes a comma seperated list for the autosuggest. When I run it like this, I expect to see Emery, Scott as one of the choices, but instead I see Emery on one line and Scott on another line. Is there a way I can escape the comma that is between the names?
Maybe there is a better way of getting the list, or maybe I can use a replace function to change the comma to a different character that looks like a comma.
Thanks in advance
Scott

This topic has been closed for replies.

1 reply

Inspiring
April 24, 2008
use:
<cfinput type="text" name="OP12"
autosuggest="#valuelist(get_drivers.DRIVER_NAME, '|')#" delimiter="|">

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
April 24, 2008
Azadi,
That didn't quite work. The result was I ended up with only the first letter of all the last names. The documentation looks like the dilimiter applys only to a static list, or a control where you can set what the dilimiter is in the return set. I don't know that you can set what the dilimiter is when the CFquery returns the data set to the Autosuggest.