[ic] Re: table drive component template for complex searches

Barry Treahy, Jr. interchange-users@icdevgroup.org
Mon Jun 10 23:43:01 2002

Barry Treahy, Jr. wrote:

> I need to create a component for page construction, preferably table 
> driven, what will allow for choices to be made from radio, check box, 
> and entered values.  There are enough similarities between our product 
> lines that being table driven could make this task much simpler in the 
> long run.
> An subset example from one of our product lines would need these types 
> of choices:
> Frequency:
>    [   ] 26.5 Ghz
>    [X] 18.0 Ghz
>    [X] 12.4 Ghz
>    [   ] 11.0 Ghz
> Power Rating:
>    [X] 2 watts
>    [X] 5 watts
>    [   ]O 10 watts
> Interface Genders:
>    *  Male/Female
>    O Female/Female
>    O Male/Male
> Low VSWR:    [  ]
> Attenuation value:  ______
> And then with the input from this dynamically created form, a search 
> would need to be constructed to scan through the products table.  A 
> side note, the intent isn't to search for a precise hit through  a 
> description or title column as individual metric columns for each 
> parameter exist, but rather reduce the 30,000 SKU's and infinite 
> choice combinations down to a manageable few SKU's and then present 
> those SKU's to the prospective buyer. 
> Before I attempt to do something that has already been created by 
> someone else who wouldn't mind sharing their efforts, has any one done 
> any thing like this?
> Can anyone provide a push start on this or at least a recommended 
> direction to head?

I've been forging ahead on this, perhaps a case of the 
blind-leading-ones-self, but so far I have a form establish which is not 
data driven as I had hoped, at least not yet :-)

I'm still trying to figure out how to handle the content selection.  I 
have the following search:

  <input type=hidden name="mv_searchtype" value="db">
  <input type=hidden name="mv_sort_field" value="category">
  <input type=hidden name="mv_sort_field" value="sku">
  <input type=hidden name="mv_sort_field" value="">
  <input type=hidden name="mv_coordinated" value="yes">
  <input type=hidden name="mv_search_map" value="
  <input type=hidden name="mv_search_field" value="freqmax">
  <input type=hidden name="mv_search_field" value="power">
  <input type=hidden name="mv_search_field" value="vswr">
  <input type=hidden name="mv_search_field" value="body">
  <input type=hidden name="mv_search_field" value="genders">
  <input type=hidden name="mv_search_field" value="interfaces">
  <input type=hidden name="mv_search_field" value="dbranges">

by gleaning hints from the archives and docs, it does select product but 
the challenge I'm running into is that first, this should be an AND 
reduction between the fields, yet the returned results appear to be an OR.

Additionally, the water is murkied because within the field such as 
POWER, if the person checks that he wants to see both 2 and 5 watt 
choices, the search seems to be applying an AND to the field search 
where I really need the logic to operate as an OR.

So, so summarize where I need to reach, each field test if non-black 
needs to reduce the results selected in an AND test between themselves. 
 Within each field, if multiple choices are available, each choice needs 
to be considered as an OR test:

    (FREQMAX eq 18 OR FREQMAX eq 12.4) AND (POWER eq 2 or POWER eq 5) 
and BODY eq STD

for example...




Barry Treahy, Jr  *  Midwest Microwave  *  Vice President & CIO 

E-mail: Treahy@mmaz.com * Phone: 480/314-1320 * FAX: 480/661-7028