5 Replies Latest reply on Sep 17, 2012 3:19 PM by Dan Bracuk

    Is it possible to have one search box search many fields? ( and "autocomplete" the results)?


      I'm really new to the whole area of JSON, autocomplete and javascript. My first project in this area is personal: making it easier to search for wines in my wine cellar.


      I have all my wines in a sqlite database (driven by CF 9 of course) and have a nice UI to report on, add, modify, delete, etc.  What I want to add is a search capability that works like this:  a user types text in a search box in any order they want and automagically, the wine is found. 


      To be specific, a user could start with "2005 Caymus" and the area below the text search box would be populated with all of the varietals of Caymus for 2005 that are in the cellar.   Similarly the user might start the search by typing "2005 Cabernet" in which case anything in the cellar that is from 2005 and a Cabernet Sauvignon or a Cabernet Franc from all wineries would appear below the text box. Or maybe they just want to see what French wines are in the cellar, so they'd start their search with "France" or "French". (BTW,  winery, vintage, wine type (varietal), country, appellation, etc. are all separate fields in the database/table.)


      Is my imagined search capability possible, or does each aspect of the search (year, winery, wine type/varietal) have to be user-entered into a separate text box?


      Any guidance/answers greatly appreciated!  If you're local, might even be worth sharing a vintage bottle of wine!