[ic] Showing only Onhand Items

Kevin Walsh kevin at cursor.biz
Wed Sep 19 13:01:49 EDT 2007


Mike Heins <mike at perusion.com> wrote:
> Quoting Peter (peter at pajamian.dhs.org):
> > On 09/18/2007 11:12 PM, Armaghan Saqib wrote:
> > > I want to make a minor change to the tree menu to show items with onhand >= 1
> > > 
> > > So after search docs, I have tried to change the link from:
> > > scan/co=yes/fi=products/sf=prod_group/se=Hand
> > > Tools/op=eq/tf=category,description
> > > 
> > > to:
> > > scan/co=yes/fi=products/sf=prod_group/se=Hand
> > > Tools/op=eq/tf=category,description/nu=0/fi=inventory/sf=qty/se=1/op=>=/nu=1
> > > 
> > > But I get the error: Sorry, no matches for Hand Tools | 1.
> > 
> > You can't search across two files like that, use the [query] tag instead:
> > <http://www.interchange.rtfm.info/icdocs/tags/query.html>
> 
> Actually, you can:
> 
> 	[area search="
> 			co=yes
> 
> 			sf=prod_group
> 			se=Hand Tools
> 			op=eq
> 			nu=no
> 			
> 			sf=inventory:quantity
> 			se=1
> 			op=>=
> 			nu=yes
> 
> 		"]
> 
> That will be fairly efficient, since the op=eq and a database search
> will limit the matches to Hand Tools. But beware that using this for a
> very large data set without a qualifier could get quite slow, as you
> need to pull the quantity field by a separate query.
> 
> You can, of course, use [query ...] and that may indeed be the
> right thing to do, especially if there is lots of data.
> 
Heh - you beat me to it.

There are a couple of other examples here:

    http://www.interchange.rtfm.info/icdocs/Interchange_search_engine.html#Coordinated_and_joined_searches

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin at cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/


More information about the interchange-users mailing list