• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CFinput and autosuggest difficulty

Explorer ,
Apr 24, 2008 Apr 24, 2008

Copy link to clipboard

Copied

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

TOPICS
Advanced techniques

Views

552

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 24, 2008 Apr 24, 2008

Copy link to clipboard

Copied

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

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 24, 2008 Apr 24, 2008

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 24, 2008 Apr 24, 2008

Copy link to clipboard

Copied

LATEST
you are right - you can't. the delimiter is only for static lists.


Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation